summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86Subtarget.h
diff options
context:
space:
mode:
authorAmara Emerson <aemerson@apple.com>2019-08-13 06:26:59 +0000
committerAmara Emerson <aemerson@apple.com>2019-08-13 06:26:59 +0000
commite14c91b71aedcf494f495189fc0ccae608ecb7fd (patch)
tree074fd462b6fd023839202561129417dba64a519f /llvm/lib/Target/X86/X86Subtarget.h
parentab04ad6af760a203eda7624e97fcb7bbca9fceab (diff)
downloadbcm5719-llvm-e14c91b71aedcf494f495189fc0ccae608ecb7fd.tar.gz
bcm5719-llvm-e14c91b71aedcf494f495189fc0ccae608ecb7fd.zip
[GlobalISel] Make the InstructionSelector instance non-const, allowing state to be maintained.
Currently we can't keep any state in the selector object that we get from subtarget. As a result we have to plumb through all our variables through multiple functions. This change makes it non-const and adds a virtual init() method to allow further state to be captured for each target. AArch64 makes use of this in this patch to cache a call to hasFnAttribute() which is expensive to call, and is used on each selection of G_BRCOND. Differential Revision: https://reviews.llvm.org/D65984 llvm-svn: 368652
Diffstat (limited to 'llvm/lib/Target/X86/X86Subtarget.h')
-rw-r--r--llvm/lib/Target/X86/X86Subtarget.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h
index 24ccc9cb784..9f73a821da2 100644
--- a/llvm/lib/Target/X86/X86Subtarget.h
+++ b/llvm/lib/Target/X86/X86Subtarget.h
@@ -527,7 +527,7 @@ public:
/// Methods used by Global ISel
const CallLowering *getCallLowering() const override;
- const InstructionSelector *getInstructionSelector() const override;
+ InstructionSelector *getInstructionSelector() const override;
const LegalizerInfo *getLegalizerInfo() const override;
const RegisterBankInfo *getRegBankInfo() const override;
OpenPOWER on IntegriCloud