summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-10-18 06:04:22 +0000
committerChris Lattner <sabre@nondot.org>2005-10-18 06:04:22 +0000
commit6c14c35bd7287413a4361168d19be2b9da3a1e61 (patch)
tree49997badf71377b559d4a17282cbec0bf0fd4f89 /llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
parented653cbe43518b5850b4e34f09bcfc6a2baefc43 (diff)
downloadbcm5719-llvm-6c14c35bd7287413a4361168d19be2b9da3a1e61.tar.gz
bcm5719-llvm-6c14c35bd7287413a4361168d19be2b9da3a1e61.zip
Fold (select C, load A, load B) -> load (select C, A, B). This happens quite
a lot throughout many programs. In particular, specfp triggers it a bunch for constant FP nodes when you have code like cond ? 1.0 : -1.0. If the PPC ISel exposed the loads implicit in pic references to external globals, we would be able to eliminate a load in cases like this as well: %X = external global int %Y = external global int int* %test4(bool %C) { %G = select bool %C, int* %X, int* %Y ret int* %G } Note that this breaks things that use SrcValue's (see the fixme), but since nothing uses them yet, this is ok. Also, simplify some code to use hasOneUse() on an SDOperand instead of hasNUsesOfValue directly. llvm-svn: 23781
Diffstat (limited to 'llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud