summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMBaseRegisterInfo.h
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2011-04-19 18:11:45 +0000
committerBob Wilson <bob.wilson@apple.com>2011-04-19 18:11:45 +0000
commitf6a4d3c2f3e1029af252a0f6999edfa3c2f326ee (patch)
treebcf774318218b9378fb7f3390036e5281cbba4d8 /lib/Target/ARM/ARMBaseRegisterInfo.h
parentb34d837397053da8e9bff90dd714e24f2a3b98b3 (diff)
downloadllvm-f6a4d3c2f3e1029af252a0f6999edfa3c2f326ee.tar.gz
llvm-f6a4d3c2f3e1029af252a0f6999edfa3c2f326ee.tar.bz2
llvm-f6a4d3c2f3e1029af252a0f6999edfa3c2f326ee.tar.xz
Avoid write-after-write issue hazards for Cortex-A9.
Add a avoidWriteAfterWrite() target hook to identify register classes that suffer from write-after-write hazards. For those register classes, try to avoid writing the same register in two consecutive instructions. This is currently disabled by default. We should not spill to avoid hazards! The command line flag -avoid-waw-hazard can be used to enable waw avoidance. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129772 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMBaseRegisterInfo.h')
-rw-r--r--lib/Target/ARM/ARMBaseRegisterInfo.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMBaseRegisterInfo.h b/lib/Target/ARM/ARMBaseRegisterInfo.h
index 0507396f2c..480892ed3e 100644
--- a/lib/Target/ARM/ARMBaseRegisterInfo.h
+++ b/lib/Target/ARM/ARMBaseRegisterInfo.h
@@ -142,6 +142,8 @@ public:
void UpdateRegAllocHint(unsigned Reg, unsigned NewReg,
MachineFunction &MF) const;
+ virtual bool avoidWriteAfterWrite(const TargetRegisterClass *RC) const;
+
bool hasBasePointer(const MachineFunction &MF) const;
bool canRealignStack(const MachineFunction &MF) const;