summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ObjectYAML/DWARFYAML.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <florian.hahn@arm.com>2017-10-30 09:04:18 +0000
committerFlorian Hahn <florian.hahn@arm.com>2017-10-30 09:04:18 +0000
commit925d3e4a986a53ac1bec7b2d780995d986be54ac (patch)
treea22002d0b8fa9311942524613cd50763600b932a /llvm/lib/ObjectYAML/DWARFYAML.cpp
parentbde3be43d7c7bae4af655f2a29a2b7d262b9e50b (diff)
downloadbcm5719-llvm-925d3e4a986a53ac1bec7b2d780995d986be54ac.tar.gz
bcm5719-llvm-925d3e4a986a53ac1bec7b2d780995d986be54ac.zip
Recommit r315288: [SCCP] Propagate integer range info for parameters in IPSCCP.
This version of the patch includes a fix addressing a stage2 LTO buildbot failure and addressed some additional nits. Original commit message: This updates the SCCP solver to use of the ValueElement lattice for parameters, which provides integer range information. The range information is used to remove unneeded icmp instructions. For the following function, f() can be optimized to ret i32 2 with this change source_filename = "sccp.c" target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: norecurse nounwind readnone uwtable define i32 @main() local_unnamed_addr #0 { entry: %call = tail call fastcc i32 @f(i32 1) %call1 = tail call fastcc i32 @f(i32 47) %add3 = add nsw i32 %call, %call1 ret i32 %add3 } ; Function Attrs: noinline norecurse nounwind readnone uwtable define internal fastcc i32 @f(i32 %x) unnamed_addr #1 { entry: %c1 = icmp sle i32 %x, 100 %cmp = icmp sgt i32 %x, 300 %. = select i1 %cmp, i32 1, i32 2 ret i32 %. } attributes #1 = { noinline } Reviewers: davide, sanjoy, efriedma, dberlin Reviewed By: davide, dberlin Subscribers: mcrosier, gberry, mssimpso, dberlin, llvm-commits Differential Revision: https://reviews.llvm.org/D36656 llvm-svn: 316887
Diffstat (limited to 'llvm/lib/ObjectYAML/DWARFYAML.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud