diff options
author | Chris Lattner <sabre@nondot.org> | 2009-07-21 23:34:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-07-21 23:34:23 +0000 |
commit | cb4596364369ea36ff5675eb12fc62d0c6f1f0dd (patch) | |
tree | 5bd26e1b7a48d8a44712c5982038743158ad0bf1 /lib/Target/ARM/ARMConstantPoolValue.h | |
parent | ce9fe9fae5f2ac1650fe2aa6ccf6dcabbb424f7c (diff) | |
download | external_llvm-cb4596364369ea36ff5675eb12fc62d0c6f1f0dd.tar.gz external_llvm-cb4596364369ea36ff5675eb12fc62d0c6f1f0dd.tar.bz2 external_llvm-cb4596364369ea36ff5675eb12fc62d0c6f1f0dd.zip |
add an API so target-independent codegen can determine if a constant
pool entry will require relocations against it. I implemented this
conservatively for ARM, someone who is knowledgable about it should
see if this can be improved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76678 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMConstantPoolValue.h')
-rw-r--r-- | lib/Target/ARM/ARMConstantPoolValue.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMConstantPoolValue.h b/lib/Target/ARM/ARMConstantPoolValue.h index abf7339646..a9308898c8 100644 --- a/lib/Target/ARM/ARMConstantPoolValue.h +++ b/lib/Target/ARM/ARMConstantPoolValue.h @@ -65,6 +65,13 @@ public: bool isStub() const { return Kind == ARMCP::CPStub; } unsigned char getPCAdjustment() const { return PCAdjust; } + virtual unsigned getRelocatationInfo() const { + // FIXME: This is conservatively claiming that these entries require a + // relocation, we may be able to do better than this. + return 2; + } + + virtual int getExistingMachineCPValue(MachineConstantPool *CP, unsigned Alignment); |