summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Fix spacing, forward declare order.Matt Arsenault2013-11-184-9/+9
| | | | llvm-svn: 194985
* Remove method that always returns true.Rafael Espindola2013-11-172-6/+1
| | | | llvm-svn: 194984
* Remove two unused #ifdefs.Rafael Espindola2013-11-171-11/+0
| | | | llvm-svn: 194983
* Remove superfluous "explicit" keyword.Rui Ueyama2013-11-171-1/+1
| | | | llvm-svn: 194982
* Remove unnecessary temporary construction.David Blaikie2013-11-171-1/+1
| | | | llvm-svn: 194981
* Remove redundant explicit default initialization.David Blaikie2013-11-171-2/+2
| | | | llvm-svn: 194980
* DwarfCompileUnit: Add type safety to createGlobalVariableDIEDavid Blaikie2013-11-173-5/+4
| | | | llvm-svn: 194979
* TableGen: Generate an enum for all named Operand types in tblgen'd InstrInfo.Ahmed Bougacha2013-11-172-0/+75
| | | | llvm-svn: 194978
* Docs: Clearly separate Operand-related paragraphs.Ahmed Bougacha2013-11-171-0/+6
| | | | llvm-svn: 194977
* Docs: Fix typo: NoIntinerary -> NoItinerary.Ahmed Bougacha2013-11-171-1/+1
| | | | llvm-svn: 194976
* Debug Info: fix typo in function name.Manman Ren2013-11-172-6/+6
| | | | llvm-svn: 194975
* Debug Info Verifier: fix when to find debug info nodes and when to verify them.Manman Ren2013-11-171-5/+11
| | | | | | | | | | | | | | | | | | We used to collect debug info MDNodes in doInitialization and verify them in doFinalization. That is incorrect since MDNodes can be modified by passes run between doInitialization and doFinalization. To fix the problem, we handle debug info MDNodes that can be reached from a function in runOnFunction (i.e we collect those nodes by calling processDeclare, processValue and processLocation, and then verify them in runOnFunction). We handle debug info MDNodes that can be reached from named metadata in doFinalization. This is in line with how Verifier handles module-level data (they are verified in doFinalization). rdar://15472296 llvm-svn: 194974
* Debug Info Verifier: enable public functions of Finder to update the type map.Manman Ren2013-11-173-11/+29
| | | | | | | | | | We used to depend on running processModule before the other public functions such as processDeclare, processValue and processLocation. We are now relaxing the constraint by adding a module argument to the three functions and letting the three functions to initialize the type map. This will be used in a follow-on patch that collects nodes reachable from a Function. llvm-svn: 194973
* RewriteBuffer::write(): Add a doc comment about non-portable useAlp Toker2013-11-171-0/+3
| | | | | | | | | | The function isn't strictly at fault but there are callers using it incorrectly, causing crashes with in-place edits of 64KB or larger files on Windows. See PR17960 for details. llvm-svn: 194972
* Tooling/CompilationDatabase.cpp: Use \return here instead of \param[out]. ↵NAKAMURA Takumi2013-11-171-3/+2
| | | | | | [-Wdocumentation] llvm-svn: 194971
* Utils/LoopUnroll.cpp: Tweak (StringRef)OldName to be valid until it is used, ↵NAKAMURA Takumi2013-11-171-1/+3
| | | | | | | | since r194601. eraseFromParent() invalidates OldName. llvm-svn: 194970
* Remove a bad string compare from r194968Alp Toker2013-11-171-1/+0
| | | | | | | | lib/Tooling/CompilationDatabase.cpp:275:34: warning: result of comparison against a string literal is unspecified (use strncmp instead) [-Wstring-compare] This assert() should probably be fixed and added back at some point. llvm-svn: 194969
* Relax some preconditions for using FixedCompilationDatabase.Edwin Vane2013-11-172-5/+226
| | | | | | | | FixedCompilationDatabase (FCD) requires that the arguments it consumes after '--' must not include positional parameters or the argv[0] of the tool. This patch relaxes those restrictions. llvm-svn: 194968
* Add -freroll-loops to enable loop rerollingHal Finkel2013-11-176-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds -freroll-loops (and -fno-reroll-loops in the usual way) to enable loop rerolling as part of the optimization pass manager. This transformation can enable vectorization, reduce code size (or both). Briefly, loop rerolling can transform a loop like this: for (int i = 0; i < 3200; i += 5) { a[i] += alpha * b[i]; a[i + 1] += alpha * b[i + 1]; a[i + 2] += alpha * b[i + 2]; a[i + 3] += alpha * b[i + 3]; a[i + 4] += alpha * b[i + 4]; } into this: for (int i = 0; i < 3200; ++i) { a[i] += alpha * b[i]; } Loop rerolling is currently disabled by default at all optimization levels. llvm-svn: 194967
* Add a loop rerolling flag to the PassManagerBuilderHal Finkel2013-11-172-1/+3
| | | | | | | | | This adds a boolean member variable to the PassManagerBuilder to control loop rerolling (just like we have for unrolling and the various vectorization options). This is necessary for control by the frontend. Loop rerolling remains disabled by default at all optimization levels. llvm-svn: 194966
* python: Fix check for disasm creation failureAnders Waldenborg2013-11-172-1/+5
| | | | | | | | | | | | Check should be for pointer being NULL, not what it points to. Also adds a test for this case. Reviewed By: indygreg Differential Revision: http://llvm-reviews.chandlerc.com/D1878 llvm-svn: 194965
* python: Properly initialize before trying to create disasmAnders Waldenborg2013-11-171-0/+26
| | | | | | | | | | | | | | | | | As the "LLVMInitializeAll*" functions are not available as symbols in the shared library they can't be used, and as a workaround a list of the targets is kept and the individual symbols tried. As soon as the "All"-functions are changed to proper symbols (as opposed to static inlines in the headers) this hack will be replace with simple calls to the corresponding "LLVMInitializeAll*" functions. Reviewed By: indygreg CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1879 llvm-svn: 194964
* [ASan] Build ASan on Windows only if MSVC is usedAlexey Samsonov2013-11-171-1/+2
| | | | llvm-svn: 194963
* Update CREDITSAlp Toker2013-11-171-0/+5
| | | | llvm-svn: 194962
* Testcase for PR17964Bill Wendling2013-11-171-0/+10
| | | | llvm-svn: 194961
* Revert "Micro-optimization"Bill Wendling2013-11-171-4/+5
| | | | | | | | This reverts commit f1d9fe9d04ce93f6d5dcebbd2cb6a07414d7a029. This was causing PR17964. We need to use thread data before regular data. llvm-svn: 194960
* DAGCombiner: Partially revert r192795, getNOT was fixed not to create ↵Benjamin Kramer2013-11-172-1/+3
| | | | | | illegal constants. llvm-svn: 194959
* CMake: don't build sanitizer runtimes on 64-bit Windows (it's unsupported ↵Alexey Samsonov2013-11-172-10/+18
| | | | | | for now) llvm-svn: 194958
* DebugLoc defines LineCol as 32 bit in comment but unsigned in code.Yaron Keren2013-11-171-1/+3
| | | | | | | | This patch modifies LineCol to be a uint32_t. See http://llvm.org/bugs/show_bug.cgi?id=17957 llvm-svn: 194957
* Fixes a typo and changes references to the function clang_displayDiagnostic ↵Sylvestre Ledru2013-11-171-3/+3
| | | | | | | | (which was removed in r96823) to clang_formatDiagnostics. Patch by David Wiberg llvm-svn: 194956
* [DFSan] Don't include public headers in dfsan runtime codeAlexey Samsonov2013-11-175-16/+35
| | | | | | | | | | | | | | | | | | | Summary: Definitions we use in public sanitizer headers may slightly conflict with the ones we use in private sanitizer runtimes. Moreover, we generally forbid to include any system headers (like <stdint.h>) in sanitizer runtime headers. This leads to inevitable duplication of selected interface function declarations, but we decided to live with it. Reviewers: pcc Reviewed By: pcc CC: kcc, llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2179 llvm-svn: 194955
* Implement vreinterpret ACLE functions in Clang.Hao Liu2013-11-172-0/+2192
| | | | llvm-svn: 194954
* [analyzer] Better modeling of memcpy by the CStringChecker (PR16731).Anton Yartsev2013-11-176-19/+95
| | | | | | | | | | | | | | New rules of invalidation/escape of the source buffer of memcpy: the source buffer contents is invalidated and escape while the source buffer region itself is neither invalidated, nor escape. In the current modeling of memcpy the information about allocation state of regions, accessible through the source buffer, is not copied to the destination buffer and we can not track the allocation state of those regions anymore. So we invalidate/escape the source buffer indirect regions in anticipation of their being invalidated for real later. This eliminates false-positive leaks reported by the unix.Malloc and alpha.cplusplus.NewDeleteLeaks checkers for the cases like char *f() { void *x = malloc(47); char *a; memcpy(&a, &x, sizeof a); return a; } llvm-svn: 194953
* Fix the problem that the arm_neon.h can't be used in a cpp file. Also fix a ↵Hao Liu2013-11-171-3/+3
| | | | | | minor bug with poly64 name mangling. llvm-svn: 194952
* Tests for core issue 241-250.Richard Smith2013-11-174-12/+139
| | | | llvm-svn: 194951
* [block-freq] Add BlockFrequency::scale that returns a remainder from the ↵Michael Gottesman2013-11-173-40/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | division and make the private scale in BlockFrequency more performant. This change is the first in a series of changes improving LLVM's Block Frequency propogation implementation to not lose probability mass in branchy code when propogating block frequency information from a basic block to its successors. This patch is a simple infrastructure improvement that does not actually modify the block frequency algorithm. The specific changes are: 1. Changes the division algorithm used when scaling block frequencies by branch probabilities to a short division algorithm. This gives us the remainder for free as well as provides a nice speed boost. When I benched the old routine and the new routine on a Sandy Bridge iMac with disabled turbo mode performing 8192 iterations on an array of length 32768, I saw ~600% increase in speed in mean/median performance. 2. Exposes a scale method that returns a remainder. This is important so we can ensure that when we scale a block frequency by some branch probability BP = N/D, the remainder from the division by D can be retrieved and propagated to other children to ensure no probability mass is lost (more to come on this). llvm-svn: 194950
* Fix 80 column violationTobias Grosser2013-11-171-2/+3
| | | | | | Found by clang-format. llvm-svn: 194949
* IslCodegen: Support for run-time conditionsTobias Grosser2013-11-174-0/+55
| | | | llvm-svn: 194948
* [PM] Completely remove support for explicit 'require' methods on theChandler Carruth2013-11-172-32/+6
| | | | | | | AnalysisManager. All this method did was assert something and we have a perfectly good way to trigger that assert from the query path. llvm-svn: 194947
* Tests for core issues 224-240.Richard Smith2013-11-172-14/+202
| | | | llvm-svn: 194946
* Use more getZExtOrTruncsMatt Arsenault2013-11-172-9/+2
| | | | llvm-svn: 194945
* Use getZExtOrTrunc instead of repeating the same logic.Matt Arsenault2013-11-171-5/+1
| | | | llvm-svn: 194944
* Add the cold attribute to error-reporting call sitesHal Finkel2013-11-172-0/+149
| | | | | | | | | | | Generally speaking, control flow paths with error reporting calls are cold. So far, error reporting calls are calls to perror and calls to fprintf, fwrite, etc. with stderr as the stream. This can be extended in the future. The primary motivation is to improve block placement (the cold attribute affects the static branch prediction heuristics). llvm-svn: 194943
* Added a size field to the stack map record to handle subregister spills.Andrew Trick2013-11-1710-82/+245
| | | | | | | | Implementing this on bigendian platforms could get strange. I added a target hook, getStackSlotRange, per Jakob's recommendation to make this as explicit as possible. llvm-svn: 194942
* Fix ndebug-build unused variable in loop rerollingHal Finkel2013-11-171-1/+1
| | | | llvm-svn: 194941
* Use right address space pointer sizeMatt Arsenault2013-11-172-1/+13
| | | | llvm-svn: 194940
* Add a loop rerolling passHal Finkel2013-11-1610-0/+1630
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a loop rerolling pass: the opposite of (partial) loop unrolling. The transformation aims to take loops like this: for (int i = 0; i < 3200; i += 5) { a[i] += alpha * b[i]; a[i + 1] += alpha * b[i + 1]; a[i + 2] += alpha * b[i + 2]; a[i + 3] += alpha * b[i + 3]; a[i + 4] += alpha * b[i + 4]; } and turn them into this: for (int i = 0; i < 3200; ++i) { a[i] += alpha * b[i]; } and loops like this: for (int i = 0; i < 500; ++i) { x[3*i] = foo(0); x[3*i+1] = foo(0); x[3*i+2] = foo(0); } and turn them into this: for (int i = 0; i < 1500; ++i) { x[i] = foo(0); } There are two motivations for this transformation: 1. Code-size reduction (especially relevant, obviously, when compiling for code size). 2. Providing greater choice to the loop vectorizer (and generic unroller) to choose the unrolling factor (and a better ability to vectorize). The loop vectorizer can take vector lengths and register pressure into account when choosing an unrolling factor, for example, and a pre-unrolled loop limits that choice. This is especially problematic if the manual unrolling was optimized for a machine different from the current target. The current implementation is limited to single basic-block loops only. The rerolling recognition should work regardless of how the loop iterations are intermixed within the loop body (subject to dependency and side-effect constraints), but the significant restriction is that the order of the instructions in each iteration must be identical. This seems sufficient to capture all current use cases. This pass is not currently enabled by default at any optimization level. llvm-svn: 194939
* ObjectiveC ARC. More validation of toll-free bridging ofFariborz Jahanian2013-11-162-3/+14
| | | | | | | CF objects with objc_bridge'ing annotaiton. // rdar://15454846 llvm-svn: 194938
* The WebKit_JS CC preserves the same registers as the C CC.Juergen Ributzka2013-11-161-0/+1
| | | | llvm-svn: 194936
* Apply the InstCombine fptrunc sqrt optimization to llvm.sqrtHal Finkel2013-11-162-6/+24
| | | | | | | | | | | | | | | | | | | InstCombine, in visitFPTrunc, applies the following optimization to sqrt calls: (fptrunc (sqrt (fpext x))) -> (sqrtf x) but does not apply the same optimization to llvm.sqrt. This is a problem because, to enable vectorization, Clang generates llvm.sqrt instead of sqrt in fast-math mode, and because this optimization is being applied to sqrt and not applied to llvm.sqrt, sometimes the fast-math code is slower. This change makes InstCombine apply this optimization to llvm.sqrt as well. This fixes the specific problem in PR17758, although the same underlying issue (optimizations applied to libcalls are not applied to intrinsics) exists for other optimizations in SimplifyLibCalls. llvm-svn: 194935
OpenPOWER on IntegriCloud