Since ARM emits inline jump tables as part of the ConstantIsland pass,
authorJim Grosbach <grosbach@apple.com>
Mon, 19 Jul 2010 17:18:28 +0000 (17:18 +0000)
committerJim Grosbach <grosbach@apple.com>
Mon, 19 Jul 2010 17:18:28 +0000 (17:18 +0000)
it should set the jump table encloding the EK_Inline. This prevents
a second, unused, copy of the table from being emitted after the function
body. PR7499.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108722 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMISelLowering.h

index 2cba4bf0cad4fc0145df0921d36b9f2f6587c87f..9b6db1d2336b8f51e85c771ca6688c1e1c109025 100644 (file)
@@ -1628,6 +1628,10 @@ static SDValue LowerConstantPool(SDValue Op, SelectionDAG &DAG) {
   return DAG.getNode(ARMISD::Wrapper, dl, MVT::i32, Res);
 }
 
+unsigned ARMTargetLowering::getJumpTableEncoding() const {
+  return MachineJumpTableInfo::EK_Inline;
+}
+
 SDValue ARMTargetLowering::LowerBlockAddress(SDValue Op,
                                              SelectionDAG &DAG) const {
   MachineFunction &MF = DAG.getMachineFunction();
index 1c178b37fab3722acf30565885e1906523f477a5..7f37e20724e7117c065e752336574f1e25cf8330 100644 (file)
@@ -175,6 +175,8 @@ namespace llvm {
   public:
     explicit ARMTargetLowering(TargetMachine &TM);
 
+    virtual unsigned getJumpTableEncoding(void) const;
+
     virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const;
 
     /// ReplaceNodeResults - Replace the results of node with an illegal result