- Aug 23, 2014
-
-
Chandler Carruth authored
these DAG combines. The DAG auto-CSE thing is truly terrible. Due to it, when RAUW-ing a node with its operand, you can cause its uses to CSE to itself, which then causes their uses to become your uses which causes them to be picked up by the RAUW. For nodes that are determined to be "no-ops", this is "fine". But if the RAUW is one of several steps to enact a transformation, this causes the DAG to really silently eat an discard nodes that you would never expect. It took days for me to actually pinpoint a test case triggering this and a really frustrating amount of time to even comprehend the bug because I never even thought about the ability of RAUW to iteratively consume nodes due to CSE-ing them into itself. To fix this, we have to build up a brand-new chain of operations any time we are combining across (potentially) intervening nodes. But once the logic is added to do this, another issue surfaces: CombineTo eagerly deletes the one node combined, *but no others*. This is... really frustrating. If deleting it makes its operands become dead, those operand nodes often won't go onto the worklist in the order you would want -- they're already on it and not near the top. That means things higher on the worklist will get combined prior to these dead nodes being GCed out of the worklist, and if the chain is long, the immediate users won't be enough to re-detect where the root of the chain is that became single-use again after deleting the dead nodes. The better way to do this is to never immediately delete nodes, and instead to just enqueue them so we can recursively delete them. The combined-from node is typically not on the worklist anyways by virtue of having been popped off.... But that in turn breaks other tests that *require* CombineTo to delete unused nodes. :: sigh :: Fortunately, there is a better way. This whole routine should have been returning the replacement rather than using CombineTo which is quite hacky. Switch to that, and all the pieces fall together. I suspect the same kind of miscompile is possible in the half-shuffle folding code, and potentially the recursive folding code. I'll be switching those over to a pattern more like this one for safety's sake even though I don't immediately have any test cases for them. Note that the only way I got a test case for this instance was with *heavily* DAG combined 256-bit shuffle sequences generated by my fuzzer. ;] llvm-svn: 216319
-
Eric Fiselier authored
llvm-svn: 216318
-
Eric Fiselier authored
llvm-svn: 216317
-
Hans Wennborg authored
llvm-svn: 216316
-
Eric Fiselier authored
Summary: In order to gather more information about testsuite results these flags should be added to LIT's default args. These new switches were recently added to LIT. It been more than two weeks since both switches were added. I think its time we add these to our LIT flags. Reviewers: mclow.lists, danalbert Reviewed By: danalbert Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5037 llvm-svn: 216315
-
Eric Fiselier authored
llvm-svn: 216314
-
David Majnemer authored
We would accidently initialize unnamed bitfields instead of the following field. llvm-svn: 216313
-
Richard Smith authored
purposes, look for other typedefs with that same name and merge into their named tag declaration if there is one. llvm-svn: 216312
-
Richard Smith authored
declared, rather than putting them into the template parameter scope. We previously had *no record* in the scope for class template declarations, once those declarations completed and their template parameter scopes were popped. This in turn caused us to be unable to merge class template declarations that were declared in the global scope (where we use scope lookup rather than DeclContext lookup for merging), when loading a module. llvm-svn: 216311
-
Alex Lorenz authored
llvm-svn: 216310
-
Sean Callanan authored
install a crash handler. <rdar://problem/18083226> llvm-svn: 216309
-
Sean Callanan authored
capitalized. llvm-svn: 216308
-
Nick Lewycky authored
Revert r215611 because it caused the infinite loop in bug 20736. There is a reduced testcase in that bug. llvm-svn: 216307
-
Richard Trieu authored
The code used getLocStart() instead of getLocEnd(). This works for single token expressions, but breaks if the expression is longer. llvm-svn: 216306
-
Enrico Granata authored
llvm-svn: 216305
-
Enrico Granata authored
llvm-svn: 216304
-
Yunzhong Gao authored
test case was fixed in r216248. llvm-svn: 216303
-
Rafael Espindola authored
There are two parts to this. First, the plugin needs to tell gold the comdat by setting comdat_key. What gets things a bit more complicated is that gold only seems symbols. In particular, if A is an alias to B, it only sees the symbols A and B. It can then ask us to keep symbol A but drop symbol B. What we have to do instead is to create an internal version of B and make A an alias to that. At some point some of this logic should be moved to lib/Linker so that we don't map a Constant to an internal version just to have lib/Linker map that again to the destination module. The reason for implementing this in tools/gold for now is simplicity. With it in place it should be possible to update clang to use comdats for constructors and destructors on ELF without breaking the LTO bootstrap. Once that is done I intend to come back and improve the interface lib/Linker exposes. llvm-svn: 216302
-
Fariborz Jahanian authored
type encoding because in certain cases, such as for vector types, because we still haven't designed encoding for them. rdar://9255564 llvm-svn: 216301
-
Alex Lorenz authored
This commit expands llvm-cov's functionality by adding support for a new code coverage tool that uses LLVM's coverage mapping format and clang's instrumentation based profiling. The gcov compatible tool can be invoked by supplying the 'gcov' command as the first argument, or by modifying the tool's name to end with 'gcov'. Differential Revision: http://reviews.llvm.org/D4445 llvm-svn: 216300
-
Jingyue Wu authored
Summary: Fixes PR20425. During slice building, if all of the incoming values of a PHI node are the same, replace the PHI node with the common value. This simplification makes alloca's used by PHI nodes easier to promote. Test Plan: Added three more tests in phi-and-select.ll Reviewers: nlewycky, eliben, meheff, chandlerc Reviewed By: chandlerc Subscribers: zinovy.nis, hfinkel, baldrick, llvm-commits Differential Revision: http://reviews.llvm.org/D4659 llvm-svn: 216299
-
David Blaikie authored
This already works, but somewhat by accident (due to the order of emission in clang, the location is set to the loop header (during the emission of the iteratior increment) before the loop backedge is emitted), so let's just add a test for symmetry and future-proofing. llvm-svn: 216298
-
David Blaikie authored
Similar to r215768 (which fixed the same case for while loops). To quote r215768's commit message: "A little test case simplification - this could be simplified further, though there are certainly interesting connections to the if/else construct so I'm hesitant to remove that entirely though it does appear somewhat unrelated. (similar fix to r215766, related to PR19864)" llvm-svn: 216297
-
Niels Ole Salscheider authored
Signed-off-by:
Niels Ole Salscheider <niels_ole@salscheider-online.de> Reviewed-by:
Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 216296
-
Rui Ueyama authored
x86 and x64 are created equal -- taking x86 as the default argument made it hard to find bugs. llvm-svn: 216295
-
Reid Kleckner authored
There's no need to do this if the user doesn't call va_start. In the future, we're going to have thunks that forward these register parameters with musttail calls, and they won't need these spills for handling va_start. Most of the test suite changes are adding va_start calls to existing tests to keep things working. llvm-svn: 216294
-
Rafael Espindola authored
llvm-svn: 216293
-
Rafael Espindola authored
llvm-svn: 216292
-
David Blaikie authored
DebugInfo: Provide scopes for C++11 range-for loop variables similar to r216288 (which was for plain-for loop condition variables). llvm-svn: 216291
-
Alexey Samsonov authored
llvm-svn: 216289
-
David Blaikie authored
for loops introduce two scopes - one for the outer loop variable and its initialization, and another for the body of the loop, including any variable declared inside the loop condition. llvm-svn: 216288
-
Zachary Turner authored
llvm-svn: 216286
-
Kevin Enderby authored
This adds the printing of the mach header. Load command printing will be next. llvm-svn: 216285
-
Kevin Enderby authored
llvm-svn: 216284
-
Hans Wennborg authored
The situation it is warning about (see PR20725) is not very likely to be a real problem, and it is unclear what action the user should take if the warning does fire. llvm-svn: 216283
-
Fariborz Jahanian authored
+initialize is called on 'super' in its implementation. rdar://16628028 llvm-svn: 216282
-
Reid Kleckner authored
This patch aims at fixing PR17239. This bug happens because the /link (clang-cl.exe argument) is marked as "consume all remaining arguments". However, when inside a response file, /link should only consume all remaining arguments inside the response file where it is located, not the entire command line after expansion. The LLVM side of the patch will change the semantics of the RemainingArgsClass kind to always consume only until the end of the response file when the option originally came from a response file. There are only two options in this class: dash dash (--) and /link. This is the Clang side of the patch in http://reviews.llvm.org/D4899 Reviewered By: rafael, rnk Differential Revision: http://reviews.llvm.org/D4900 Patch by Rafael Auler! llvm-svn: 216281
-
Reid Kleckner authored
This patch contains the LLVM side of the fix of PR17239. This bug that happens because the /link (clang-cl.exe argument) is marked as "consume all remaining arguments". However, when inside a response file, /link should only consume all remaining arguments inside the response file where it is located, not the entire command line after expansion. My patch will change the semantics of the RemainingArgsClass kind to always consume only until the end of the response file when the option originally came from a response file. There are only two options in this class: dash dash (--) and /link. Reviewed By: rnk Differential Revision: http://reviews.llvm.org/D4899 Patch by Rafael Auler! llvm-svn: 216280
-
Tom Stellard authored
llvm-svn: 216279
-
Tom Stellard authored
llvm-svn: 216278
-