diff options
author | Nadav Rotem <nadav.rotem@intel.com> | 2011-05-18 12:26:38 +0000 |
---|---|---|
committer | Nadav Rotem <nadav.rotem@intel.com> | 2011-05-18 12:26:38 +0000 |
commit | fe3f5d7538954474731dbbed70430016600fa477 (patch) | |
tree | b6baca5d8c52263cb3b25e8449340c58398e200a /lib/Transforms/Scalar/CodeGenPrepare.cpp | |
parent | 7016ec1a458bd39decbe4573cc3d53eb4b736c75 (diff) | |
download | external_llvm-fe3f5d7538954474731dbbed70430016600fa477.zip external_llvm-fe3f5d7538954474731dbbed70430016600fa477.tar.gz external_llvm-fe3f5d7538954474731dbbed70430016600fa477.tar.bz2 |
Refactor getActionType and getTypeToTransformTo ; place all of the 'decision'
code in one place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131534 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/CodeGenPrepare.cpp')
-rw-r--r-- | lib/Transforms/Scalar/CodeGenPrepare.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index 0184390..6c62010 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -371,9 +371,9 @@ static bool OptimizeNoopCopyExpression(CastInst *CI, const TargetLowering &TLI){ // If these values will be promoted, find out what they will be promoted // to. This helps us consider truncates on PPC as noop copies when they // are. - if (TLI.getTypeAction(SrcVT) == TargetLowering::Promote) + if (TLI.getTypeAction(CI->getContext(), SrcVT) == TargetLowering::Promote) SrcVT = TLI.getTypeToTransformTo(CI->getContext(), SrcVT); - if (TLI.getTypeAction(DstVT) == TargetLowering::Promote) + if (TLI.getTypeAction(CI->getContext(), DstVT) == TargetLowering::Promote) DstVT = TLI.getTypeToTransformTo(CI->getContext(), DstVT); // If, after promotion, these are the same types, this is a noop copy. |