Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: src/IceTargetLoweringARM32.h

Issue 1838753002: Subzero: Remove IceString. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: More cleanup Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringARM32.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceTargetLoweringARM32.h
diff --git a/src/IceTargetLoweringARM32.h b/src/IceTargetLoweringARM32.h
index 36f5cfdfa1fbb7eeaed2b9fc590c33992a989da8..fd40b38e4d73f7f9e915e41c03d607e4e8312113 100644
--- a/src/IceTargetLoweringARM32.h
+++ b/src/IceTargetLoweringARM32.h
@@ -58,6 +58,16 @@ class TargetARM32 : public TargetLowering {
public:
static void staticInit(GlobalContext *Ctx);
+
+ static bool shouldBePooled(const Constant *C) {
+ if (auto *ConstDouble = llvm::dyn_cast<ConstantDouble>(C)) {
+ return !Utils::isPositiveZero(ConstDouble->getValue());
+ }
+ if (llvm::isa<ConstantFloat>(C))
+ return true;
+ return false;
+ }
+
// TODO(jvoung): return a unique_ptr.
static std::unique_ptr<::Ice::TargetLowering> create(Cfg *Func) {
return makeUnique<TargetARM32>(Func);
@@ -81,7 +91,7 @@ public:
SizeT getNumRegisters() const override { return RegARM32::Reg_NUM; }
Variable *getPhysicalRegister(RegNumT RegNum,
Type Ty = IceType_void) override;
- IceString getRegName(RegNumT RegNum, Type Ty) const override;
+ const char *getRegName(RegNumT RegNum, Type Ty) const override;
SmallBitVector getRegisterSet(RegSetMask Include,
RegSetMask Exclude) const override;
const SmallBitVector &
@@ -914,8 +924,8 @@ protected:
/// @{
// TODO(jpp): if the same global G is used in different functions, then this
// method will emit one G(gotoff) relocation per function.
- IceString createGotoffRelocation(const ConstantRelocatable *CR);
- CfgUnorderedSet<IceString> KnownGotoffs;
+ GlobalString createGotoffRelocation(const ConstantRelocatable *CR);
+ CfgUnorderedSet<GlobalString> KnownGotoffs;
/// @}
/// Loads the constant relocatable Name to Register. Then invoke Finish to
@@ -936,7 +946,7 @@ protected:
// The -8 in movw/movt above is to account for the PC value that the first
// instruction emitted by Finish(PC) will read.
void
- loadNamedConstantRelocatablePIC(const IceString &Name, Variable *Register,
+ loadNamedConstantRelocatablePIC(GlobalString Name, Variable *Register,
std::function<void(Variable *PC)> Finish);
/// Sandboxer defines methods for ensuring that "dangerous" operations are
@@ -1296,7 +1306,7 @@ public:
}
void lowerGlobals(const VariableDeclarationList &Vars,
- const IceString &SectionSuffix) override;
+ const std::string &SectionSuffix) override;
void lowerConstants() override;
void lowerJumpTables() override;
« no previous file with comments | « src/IceTargetLowering.cpp ('k') | src/IceTargetLoweringARM32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698