diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-06-30 01:53:36 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-06-30 01:53:36 +0000 |
commit | fe6e405e8c8a7f75996ef44e4e7ad77c1261dc7a (patch) | |
tree | 03699727329ebc9865d9c41f71be5b1b08c6b31b /llvm/lib/Target/ARM/ARMTargetMachine.h | |
parent | 91e56620753d6f717b17b3f9d1336098a60872cd (diff) | |
download | bcm5719-llvm-fe6e405e8c8a7f75996ef44e4e7ad77c1261dc7a.tar.gz bcm5719-llvm-fe6e405e8c8a7f75996ef44e4e7ad77c1261dc7a.zip |
Fix the ridiculous SubtargetFeatures API where it implicitly expects CPU name to
be the first encoded as the first feature. It then uses the CPU name to look up
features / scheduling itineray even though clients know full well the CPU name
being used to query these properties.
The fix is to just have the clients explictly pass the CPU name!
llvm-svn: 134127
Diffstat (limited to 'llvm/lib/Target/ARM/ARMTargetMachine.h')
-rw-r--r-- | llvm/lib/Target/ARM/ARMTargetMachine.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMTargetMachine.h b/llvm/lib/Target/ARM/ARMTargetMachine.h index e0aa149c4cc..a4a792763d0 100644 --- a/llvm/lib/Target/ARM/ARMTargetMachine.h +++ b/llvm/lib/Target/ARM/ARMTargetMachine.h @@ -41,7 +41,8 @@ private: public: ARMBaseTargetMachine(const Target &T, const std::string &TT, - const std::string &FS, bool isThumb); + const std::string &CPU, const std::string &FS, + bool isThumb); virtual ARMJITInfo *getJITInfo() { return &JITInfo; } virtual const ARMSubtarget *getSubtargetImpl() const { return &Subtarget; } @@ -70,7 +71,7 @@ class ARMTargetMachine : public ARMBaseTargetMachine { ARMFrameLowering FrameLowering; public: ARMTargetMachine(const Target &T, const std::string &TT, - const std::string &FS); + const std::string &CPU, const std::string &FS); virtual const ARMRegisterInfo *getRegisterInfo() const { return &InstrInfo.getRegisterInfo(); @@ -109,7 +110,7 @@ class ThumbTargetMachine : public ARMBaseTargetMachine { OwningPtr<ARMFrameLowering> FrameLowering; public: ThumbTargetMachine(const Target &T, const std::string &TT, - const std::string &FS); + const std::string &CPU, const std::string &FS); /// returns either Thumb1RegisterInfo or Thumb2RegisterInfo virtual const ARMBaseRegisterInfo *getRegisterInfo() const { |