summaryrefslogtreecommitdiffstats
path: root/clang/test/Misc/backend-optimization-failure.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Attempt to pacify buildbots after r280217James Molloy2016-08-311-2/+2
| | | | | | | | These clang tests check diagnostics from the backend by giving it an unvectorizable loop. This loop is now vectorized :/ Make it really unvectorizable by making it unprofitable to ifconvert. llvm-svn: 280220
* Add a loop's debug location to its llvm.loop metadataHal Finkel2016-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Getting accurate locations for loops is important, because those locations are used by the frontend to generate optimization remarks. Currently, optimization remarks for loops often appear on the wrong line, often the first line of the loop body instead of the loop itself. This is confusing because that line might itself be another loop, or might be somewhere else completely if the body was an inlined function call. This happens because of the way we find the loop's starting location. First, we look for a preheader, and if we find one, and its terminator has a debug location, then we use that. Otherwise, we look for a location on an instruction in the loop header. The fallback heuristic is not bad, but will almost always find the beginning of the body, and not the loop statement itself. The preheader location search often fails because there's often not a preheader, and even when there is a preheader, depending on how it was formed, it sometimes carries the location of some preceeding code. I don't see any good theoretical way to fix this problem. On the other hand, this seems like a straightforward solution: Put the debug location in the loop's llvm.loop metadata. When emitting debug information, this commit causes us to add the debug location as an operand to each loop's llvm.loop metadata. Thus, we now generate this metadata for all loops (not just loops with optimization hints) when we're otherwise generating debug information. The remark test case changes depend on the companion LLVM commit r270771. llvm-svn: 270772
* Stop messing with the 'g' group of options in CompilerInvocation.Douglas Katzman2015-10-081-1/+1
| | | | | | | | | | | | | | | | With this change, most 'g' options are rejected by CompilerInvocation. They remain only as Driver options. The new way to request debug info from cc1 is with "-debug-info-kind={line-tables-only|limited|standalone}" and "-dwarf-version={2|3|4}". In the absence of a command-line option to specify Dwarf version, the Toolchain decides it, rather than placing Toolchain-specific logic in CompilerInvocation. Also fix a bug in the Windows compatibility argument parsing in which the "rightmost argument wins" principle failed. Differential Revision: http://reviews.llvm.org/D13221 llvm-svn: 249655
* Fix test case.Sanjoy Das2015-03-021-2/+2
| | | | | | | | | | r230921 broke backend-optimization-failure.cpp: after r230921, LLVM no longer emits an expression to compute 'Length - 1' and this perturbs LoopSimplify enough to emit the warning on line 10 instead of line 9. This is a review request to fix the test case once I re-land r230921. llvm-svn: 231020
* Adjust test to handle fallout from r217102.David Majnemer2014-09-031-2/+2
| | | | llvm-svn: 217104
* clang/test/Misc/backend-optimization-failure.cpp: Appease to add -triple=x86_64.NAKAMURA Takumi2014-07-191-1/+2
| | | | | FIXME: Could this be made generic? llvm-svn: 213441
* Recommit: Handle diagnostic warnings in Frontend diagnostic handler.Tyler Nowicki2014-07-181-0/+20
Clang uses a diagnostic handler to grab diagnostic messages so it can print them with the line of source code they refer to. This patch extends this to handle optimization failures that were added to llvm to produce a warning when loop vectorization is explicitly specified (using a pragma clang loop directive) but fails. Update renames warning flag name to avoid indicating the flag's severity and adds a test. Reviewed by Alp Toker llvm-svn: 213400
OpenPOWER on IntegriCloud