- Apr 23, 2015
-
-
Reid Kleckner authored
These extra endcatch markers aren't helping identify regions to outline, so let's get rid of them. LLVM outlines (more or less) from begincatch to endcatch. Any unwind edge from an enclosed invoke is a transition to a new exception handler, which has it's own outlining markers. llvm-svn: 235562
-
Hans Wennborg authored
This is a re-commit of r235101, which also fixes the problems with the previous patch: - Switches with only a default case and non-fallthrough were handled incorrectly - The previous patch tickled a bug in PowerPC Early-Return Creation which is fixed here. > This is a major rewrite of the SelectionDAG switch lowering. The previous code > would lower switches as a binary tre, discovering clusters of cases > suitable for lowering by jump tables or bit tests as it went along. To increase > the likelihood of finding jump tables, the binary tree pivot was selected to > maximize case density on both sides of the pivot. > > By not selecting the pivot in the middle, the binary trees would not always > be balanced, leading to performance problems in the generated code. > > This patch rewrites the lowering to search for clusters of cases > suitable for jump tables or bit tests first, and then builds the binary > tree around those clusters. This way, the binary tree will always be balanced. > > This has the added benefit of decoupling the different aspects of the lowering: > tree building and jump table or bit tests finding are now easier to tweak > separately. > > For example, this will enable us to balance the tree based on profile info > in the future. > > The algorithm for finding jump tables is quadratic, whereas the previous algorithm > was O(n log n) for common cases, and quadratic only in the worst-case. This > doesn't seem to be major problem in practice, e.g. compiling a file consisting > of a 10k-case switch was only 30% slower, and such large switches should be rare > in practice. Compiling e.g. gcc.c showed no compile-time difference. If this > does turn out to be a problem, we could limit the search space of the algorithm. > > This commit also disables all optimizations during switch lowering in -O0. > > Differential Revision: http://reviews.llvm.org/D8649 llvm-svn: 235560
-
Zachary Turner authored
Previously we would pass an argument to finishSwigWrapperClasses.py which specified whether this was a debug or a release build. But sometimes CMAKE_BUILD_TYPE would not be set to anything, causing this argument to be empty when passed in. The only purpose of this argument was to determine whether or not to append _d to the extension module when creating the symlink. This is only necessary when doing a debug build of LLDB on Windows, which implies a debug interpreter, so we replace this with a check to see if the running interpreter is a debug one, and append _d if so. llvm-svn: 235559
-
David Majnemer authored
Only clear out the NSW/NUW flags if we are optimizing 'add'/'sub' while taking advantage that the sign bit is not set. We do this optimization to further shrink the mask but shrinking the mask isn't NSW/NUW preserving in this case. llvm-svn: 235558
-
Reid Kleckner authored
This removes the -sehprepare flag and makes __C_specific_handler functions always to use WinEHPrepare. This was tested by building all of chromium_builder_tests and running a few tests that use SEH, but if something breaks, we can revert this. llvm-svn: 235557
-
Krzysztof Parzyszek authored
llvm-svn: 235556
-
Reid Kleckner authored
llvm-svn: 235555
-
Lang Hames authored
Patch by Andy Ayers. Thanks Andy! llvm-svn: 235554
-
David Majnemer authored
This reverts commit r234700. It turns out that the lifetime markers were not the cause of Chromium failing but a bug which was uncovered by optimizations exposed by the markers. llvm-svn: 235553
-
Krzysztof Parzyszek authored
llvm-svn: 235552
-
Reid Kleckner authored
llvm-svn: 235551
-
Reid Kleckner authored
In particular, this handles SSA values that are live *out* of a handler. The existing code only handles values that are live *in* to a handler. It also handles phi nodes in the block where normal control should resume after the end of a catch handler. When EH return points have phi nodes, we need to split the return edge. It is impossible for phi elimination to emit copies in the previous block if that block gets outlined. The indirectbr that we leave in the function is only notional, and is eliminated from the MachineFunction CFG early on. Reviewers: majnemer, andrew.w.kaylor Differential Revision: http://reviews.llvm.org/D9158 llvm-svn: 235545
-
David Majnemer authored
An nsw/nuw operation relies on the values feeding into it to not overflow if 'poison' is not to be produced. This means that optimizations which make modifications to the bottom of a chain (like SimplifyDemandedBits) must strip out nsw/nuw if they cannot ensure that they will be preserved. This fixes PR23309. llvm-svn: 235544
-
Lang Hames authored
Thanks to Dave Blaikie for catching this. llvm-svn: 235543
-
Reid Kleckner authored
I added the poisoning back in r76891 (2009) because of some bugs in Unladen Swallow, and then Evan Cheng added the setRangeWritable() call in r81308. Profiling a Release+Asserts build on Windows shows that this memory protection call is actually very expensive. 4 seconds of a 70 second Clang compilation are spent in VirtualQuery. These days we have more reliable tools like ASan to find these kinds of bugs, so we can go ahead and retire these checks. llvm-svn: 235542
-
Lang Hames authored
llvm-svn: 235541
-
Alexey Samsonov authored
llvm-svn: 235540
-
Alexey Samsonov authored
llvm-svn: 235539
-
Jim Ingham authored
breakpoints, for instance on the class of the thrown object. This change doesn't actually make that work, the part where we extract the thrown object type from the throw site isn't done yet. This provides a general programmatic "precondition" that you can add to breakpoints to give them the ability to do filtering on the LLDB side before we pass the stop on to the user-provided conditions & callbacks. llvm-svn: 235538
-
Reid Kleckner authored
Otherwise -fno-omit-frame-pointer and other flags like it aren't applied. Basic idea taken from Gao's patch, thanks! Differential Revision: http://reviews.llvm.org/D9203 llvm-svn: 235537
-
Yaron Keren authored
This is divrem_big7 since divrem_big6 is used in Pawel upcoming patch. llvm-svn: 235536
-
Krzysztof Parzyszek authored
llvm-svn: 235535
-
David Blaikie authored
This reverts commit r235458. It looks like this might be breaking something LTO-ish. Looking into it & will recommit with a fix/test case/etc once I've got more to go on. llvm-svn: 235533
-
Pete Cooper authored
The CondOpt pass currently uses LiveIntervals to set the dead flag on a def. This patch uses MachineRegisterInfo::use_empty instead as that is equivalent to the def being dead. This removes an instance of LiveIntervals in the pass manager pipeline and saves 3.8% of compile time on llc conpiled for AArch64. Reviewed by Chad Rosier and Zhaoshi. llvm-svn: 235532
-
Sanjay Patel authored
llvm-svn: 235531
-
Pirama Arumuga Nainar authored
Summary: Remove the CHECK-DAG calls introduced in r235341, and add a comment that this test may break due to scheduling variations. This patch completes the fix discussed in http://reviews.llvm.org/D8804 Reviewers: dsanders, srhines Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9178 llvm-svn: 235530
-
Krzysztof Parzyszek authored
llvm-svn: 235529
-
Pete Cooper authored
This causes OpKind and all the bitfields after it to use 32-bit load/stores instead of i24's for the existing bitfields. Bugs will be filed to track whether clang and llvm could have generated the 32-bit operations in the front-end or optimizer. Reviewed by Rafael. llvm-svn: 235528
-
Jim Ingham authored
llvm-svn: 235527
-
Luqman Aden authored
llvm-svn: 235526
-
Krzysztof Parzyszek authored
llvm-svn: 235525
-
Matt Arsenault authored
No test since calls are not actually supported yet. llvm-svn: 235524
-
Ed Maste authored
llvm.org/pr23318 llvm-svn: 235523
-
Yaron Keren authored
llvm-svn: 235522
-
Krzysztof Parzyszek authored
- Use static allocation for aligned stack objects. - Simplify dynamic stack object allocation. - Simplify elimination of frame-indices. llvm-svn: 235521
-
David Blaikie authored
[opaque pointer type] Use pointee type retrieved from asm, rather than accessing it via the pointer type llvm-svn: 235520
-
Reid Kleckner authored
llvm-svn: 235519
-
Daniel Sanders authored
Summary: ubsan was correctly catching the undefined behaviour but lit's shell was failing the test anyway because the exit code was non-zero as a result of the undefined behaviour. This fixes the test on a mips-linux-gnu target. Reviewers: samsonov Reviewed By: samsonov Subscribers: samsonov, llvm-commits, rsmith, sagar Differential Revision: http://reviews.llvm.org/D9155 llvm-svn: 235518
-
Sanjay Patel authored
Differential Revision: http://reviews.llvm.org/D7296 llvm-svn: 235517
-
- Apr 22, 2015
-
-
Krzysztof Parzyszek authored
llvm-svn: 235516
-