diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2013-01-05 11:43:11 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2013-01-05 11:43:11 +0000 |
commit | 7bdf6b00e04c177f22133b5d4be10cb246cb1e76 (patch) | |
tree | 7eca0d64d4d8fb0c6e2f2ddc40f549d6b75ef1f1 /tools/opt | |
parent | be73c7b903647221fbcaae302d31e90f53583040 (diff) | |
download | llvm-7bdf6b00e04c177f22133b5d4be10cb246cb1e76.tar.gz llvm-7bdf6b00e04c177f22133b5d4be10cb246cb1e76.tar.bz2 llvm-7bdf6b00e04c177f22133b5d4be10cb246cb1e76.tar.xz |
Convert the TargetTransformInfo from an immutable pass with dynamic
interfaces which could be extracted from it, and must be provided on
construction, to a chained analysis group.
The end goal here is that TTI works much like AA -- there is a baseline
"no-op" and target independent pass which is in the group, and each
target can expose a target-specific pass in the group. These passes will
naturally chain allowing each target-specific pass to delegate to the
generic pass as needed.
In particular, this will allow a much simpler interface for passes that
would like to use TTI -- they can have a hard dependency on TTI and it
will just be satisfied by the stub implementation when that is all that
is available.
This patch is a WIP however. In particular, the "stub" pass is actually
the one and only pass, and everything there is implemented by delegating
to the target-provided interfaces. As a consequence the tools still have
to explicitly construct the pass. Switching targets to provide custom
passes and sinking the stub behavior into the NoTTI pass is the next
step.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171621 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt')
-rw-r--r-- | tools/opt/opt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 9c9e394043..c2987f19ed 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -658,8 +658,8 @@ int main(int argc, char **argv) { std::auto_ptr<TargetMachine> TM(Machine); if (TM.get()) { - Passes.add(new TargetTransformInfo(TM->getScalarTargetTransformInfo(), - TM->getVectorTargetTransformInfo())); + Passes.add(createNoTTIPass(TM->getScalarTargetTransformInfo(), + TM->getVectorTargetTransformInfo())); } OwningPtr<FunctionPassManager> FPasses; |