summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [PowerPC] Improve int_to_fp(fp_to_int(x)) combiningHal Finkel2015-01-063-30/+144
| | | | | | | | | The old target DAG combine that allowed for performing int_to_fp(fp_to_int(x)) without a load/store pair is updated here with support for unsigned integers, and to support single-precision values without a third rounding step, on newer cores with the appropriate instructions. llvm-svn: 225248
* Basic: fix compilation with MSVCSaleem Abdulrasool2015-01-061-2/+4
| | | | | | | | | | | | | | MSVC doesn't like the instantiation of the structure in the initializer list. Initialize it in the constructor body to repair the build. TargetInfo.h(545) : error C2143: syntax error : missing ')' before '{' TargetInfo.h(545) : error C2143: syntax error : missing ';' before '}' TargetInfo.h(545) : error C2059: syntax error : ')' TargetInfo.h(545) : error C2059: syntax error : ',' TargetInfo.h(547) : error C2143: syntax error : missing ';' before '{' TargetInfo.h(547) : error C2447: '{' : missing function header (old-style formal list?) llvm-svn: 225247
* [PM] Add a utility pass template that synthesizes the invalidation ofChandler Carruth2015-01-065-5/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | a specific analysis result. This is quite handy to test things, and will also likely be very useful for debugging issues. You could narrow down pass validation failures by walking these invalidate pass runs up and down the pass pipeline, etc. I've added support to the pass pipeline parsing to be able to create one of these for any analysis pass desired. Just adding this class uncovered one latent bug where the AnalysisManager CRTP base class had a hard-coded Module type rather than using IRUnitT. I've also added tests for invalidation and caching of analyses in a basic way across all the pass managers. These in turn uncovered two more bugs where we failed to correctly invalidate an analysis -- its results were invalidated but the key for re-running the pass was never cleared and so it was never re-run. Quite nasty. I'm very glad to debug this here rather than with a full system. Also, yes, the naming here is horrid. I'm going to update some of the names to be slightly less awful shortly. But really, I've no "good" ideas for naming. I'll be satisfied if I can get it to "not bad". llvm-svn: 225246
* [PM] Simplify how we use the registry by including it only once. StillChandler Carruth2015-01-061-18/+0
| | | | | | | | | more verbose than I'd like, but the code really isn't that interesting, and this still seems vastly simpler than any other solutions I've come up with. =] Maybe if we get to the 10th IR unit, this will be a problem in practice. llvm-svn: 225245
* Sema: analyze I,J,K,M,N,O constraintsSaleem Abdulrasool2015-01-066-4/+198
| | | | | | | | | | Add additional constraint checking for target specific behaviour for inline assembly constraints. We would previously silently let all arguments through for these constraints. In cases where the constraints were violated, we could end up failing to select instructions and triggering assertions or worse, silently ignoring instructions. llvm-svn: 225244
* [X86] Remove 16-bit and 32-bit offset jump instructions from the AsmParser. ↵Craig Topper2015-01-061-2/+2
| | | | | | We always select the 8-bit size and let the assembler backend relax to the larger size. llvm-svn: 225243
* [X86] Make isel select the shorter form of jump instructions instead of the ↵Craig Topper2015-01-068-120/+97
| | | | | | | | long form. The assembler backend will relax to the long form if necessary. This removes a swap from long form to short form in the MCInstLowering code. Selecting the long form used to be required by the old JIT. llvm-svn: 225242
* Set the default ISA for OpenBSD/mips64 to MIPS III.Brad Smith2015-01-062-0/+12
| | | | llvm-svn: 225241
* [PM] Add a collection of no-op analysis passes and switch the new passChandler Carruth2015-01-064-7/+57
| | | | | | | | | | | | manager tests to use them and be significantly more comprehensive. This, naturally, uncovered a bug where the CGSCC pass manager wasn't printing analyses when they were run. The only remaining core manipulator is I think an invalidate pass similar to the require pass. That'll be next. =] llvm-svn: 225240
* [Sanitizer] Use COMMON_FLAG macro to describe common runtime flags.Alexey Samsonov2015-01-064-183/+143
| | | | | | | | | | | | | | | | | Summary: Introduce a single place where we specify flag type, name, default value, and description. This removes a large amount of boilerplate and ensures we won't leave flags uninitialized. Test Plan: regression test suite Reviewers: kcc Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6851 llvm-svn: 225239
* [PM] Sink the no-op pass parsing logic into the .def-based registry toChandler Carruth2015-01-062-21/+3
| | | | | | | | simplify things. This will become more important as I add no-op analyses that want to re-use the logic we already have for analyses in the registry. For now, no functionality changed. llvm-svn: 225238
* [PM] Move the analysis registry into the Passes.cpp file and provideChandler Carruth2015-01-063-12/+46
| | | | | | | | | | | | | | | a normal interface for it in Passes.h. This gives us essentially a single interface for running pass managers which are provided from the bottom of the LLVM stack through interfaces at the top of the LLVM stack that populate them with all of the different analyses available throughout. It also means there is a single blob of code that needs to include all of the pass headers and needs to deal with the registry of passes and parsing names. No functionality changed intended, should just be cleanup. llvm-svn: 225237
* [PM] Add a utility to the new pass manager for generating a pass whichChandler Carruth2015-01-063-4/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is a no-op other than requiring some analysis results be available. This can be used in real pass pipelines to force the usually lazy analysis running to eagerly compute something at a specific point, and it can be used to test the pass manager infrastructure (my primary use at the moment). I've also added bit of pipeline parsing magic to support generating these directly from the opt command so that you can directly use these when debugging your analysis. The syntax is: require<analysis-name> This can be used at any level of the pass manager. For example: cgscc(function(require<my-analysis>,no-op-function)) This would produce a no-op function pass requiring my-analysis, followed by a fully no-op function pass, both of these in a function pass manager which is nested inside of a bottom-up CGSCC pass manager which is in the top-level (implicit) module pass manager. I have zero attachment to the particular syntax I'm using here. Consider it a straw man for use while I'm testing and fleshing things out. Suggestions for better syntax welcome, and I'll update everything based on any consensus that develops. I've used this new functionality to more directly test the analysis printing rather than relying on the cgscc pass manager running an analysis for me. This is still minimally tested because I need to have analyses to run first! ;] That patch is next, but wanted to keep this one separate for easier review and discussion. llvm-svn: 225236
* Add a testcase that would have found the problem in r225048.Rafael Espindola2015-01-061-0/+27
| | | | llvm-svn: 225235
* [ubsan] partially enable -fsanitize-coverage=N with ubsan. It will work as ↵Kostya Serebryany2015-01-062-0/+37
| | | | | | usual in most cases but will not dump coverage on error with -fno-sanitize-recover (that'll be a separate fix) llvm-svn: 225234
* Remove dead variable.Eric Christopher2015-01-062-2/+1
| | | | llvm-svn: 225233
* Use the same call off of the TargetMachine rather than the subtarget.Eric Christopher2015-01-061-1/+1
| | | | llvm-svn: 225232
* Rewrite the Mips16HardFloat pass to avoid using the Subtarget.Eric Christopher2015-01-064-26/+18
| | | | llvm-svn: 225231
* [asan/tracing] write the trace using a sequence of internal_write calls ↵Kostya Serebryany2015-01-061-13/+23
| | | | | | instead of just one (otherwise files of > 2Gb are trunkated). Also a minor adjustment to the trace collection. llvm-svn: 225230
* Allow -fsanitize-coverage=N with ubsan, clang partKostya Serebryany2015-01-062-2/+9
| | | | | | | | | | | | | | | | | | | | Summary: Allow -fsanitize-coverage=N with ubsan, clang part. This simply allows the flag combination. The LLVM will work out of the box, the compile-rt part will follow as a separate patch. Test Plan: check-clang Reviewers: samsonov Reviewed By: samsonov Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D6849 llvm-svn: 225229
* Revert r225048: It broke ObjC on AArch64.Lang Hames2015-01-0619-303/+247
| | | | | | I've filed http://llvm.org/PR22100 to track this issue. llvm-svn: 225228
* Remove X86 .quad workaround for buggy GNU assembler on OpenBSD / Bitrig.Brad Smith2015-01-061-5/+0
| | | | llvm-svn: 225227
* Add 64-bit multiply functions to iOS arm64 compiler-rt dylibNick Kledzik2015-01-061-0/+1
| | | | llvm-svn: 225226
* More fixes to ensure if we are asked to launch a x86_64h process on darwin, ↵Greg Clayton2015-01-062-1/+4
| | | | | | that darwin-debug knows what to do and how to handle it. llvm-svn: 225225
* Fix being able to get a thread result when calling HostThreadPosix::Join(). ↵Greg Clayton2015-01-061-2/+5
| | | | | | | | It was broken when initially checked in by getting the thread result into a temporary variable and never doing anything with it. Most threads in LLDB don't look at their thread results, but launching processes in a terminal window on MacOSX does require getting a thread result and this broke "process launch --tty" on darwin. <rdar://problem/19308966> llvm-svn: 225224
* IR: Don't drop MDNode uniquing on null operandsDuncan P. N. Exon Smith2015-01-052-7/+22
| | | | | | | | | | Now that `LLVMContextImpl` can call `MDNode::dropAllReferences()` to prevent teardown madness, stop dropping uniquing just because an operand drops to null. Part of PR21532. llvm-svn: 225223
* Revert "Use the integrated assembler by default on 32-bit PowerPC and SPARC"Duncan P. N. Exon Smith2015-01-052-2/+4
| | | | | | | | | This reverts commit r225213. It's failing on multiple buildbots [1][2]. [1]: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/22032 [2]: http://lab.llvm.org:8080/green/view/Clang/job/clang-stage1-cmake-RA-incremental_check/2357/ llvm-svn: 225222
* Revert "Use the integrated assembler by default on 32-bit PowerPC and SPARC"Duncan P. N. Exon Smith2015-01-054-7/+31
| | | | | | | | | This reverts commit r225212. It's failing on multiple buildbots [1][2]. [1]: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/22032 [2]: http://lab.llvm.org:8080/green/view/Clang/job/clang-stage1-cmake-RA-incremental_check/2357/ llvm-svn: 225221
* [PowerPC] Fix test to pass on Darwin hostsHal Finkel2015-01-051-1/+3
| | | | llvm-svn: 225220
* Make array symbol reading resilient to incomplete DWARF.Siva Chandra2015-01-052-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: GCC emits DW_TAG_subrange_type for static member arrays, but with no attributes. This in turn results in wrong type/value of the array when printing with 'target variable <array var name>'. This patch fixes this so that the array value is printed in this format: (<element type> []) <array var name> = {} Earlier, the array was being interpreted to be of its element type. Note: This does not fix anything to do with 'expr' or 'p' commands. Those commands still error out complaining about incomplete types. Test Plan: dotest.py -p TestStaticVariables Reviewers: emaste, clayborg Reviewed By: clayborg Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D6799 llvm-svn: 225219
* When building on Windows, copy Python27(_d).dll to the output folder.Zachary Turner2015-01-051-0/+5
| | | | | | | | When Python does not exist on the system path, LLDB will be unable to load it. Fix this by copying the dll to the output folder so it will be side-by-side with lldb.exe. llvm-svn: 225218
* [PowerPC] Remove old README.txt entryHal Finkel2015-01-051-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | We no longer generate horrible code for the stated function: void f(signed char *a, _Bool b, _Bool c) { signed char t = 0; if (b) t = *a; if (c) *a = t; } for which we now generate: .L.f: andi. 5, 5, 1 cmpldi 1, 4, 0 li 5, 0 beq 1, .LBB0_2 lbz 5, 0(3) .LBB0_2: # %if.end bclr 4, 1, 0 stb 5, 0(3) blr so we don't need the README.txt entry. llvm-svn: 225217
* [X86][SSE] lowerVectorShuffleAsByteShift tidyupSimon Pilgrim2015-01-051-21/+14
| | | | | | Removed local isSequential predicate and use standard helper isSequentialOrUndefInRange instead. llvm-svn: 225216
* tests: correct builtins test if built under -mthumb on ARMSaleem Abdulrasool2015-01-052-11/+28
| | | | | | | | | | | The clear_cache and enable_execute_stack tests attempt to memcpy the definition of a function into a buffer before executing the function. The problem with this approach is that on some targets (ARM with thumb mode compilation, MIPS with MIPS16 codegen or uMIPS), you would use a pointer which is incorrect (it would be off-by-one) due to the ISA selection being encoded into the address. This ensures that the function address is retrieved correctly in all cases. llvm-svn: 225215
* [PowerPC] Convert a README.txt entry into a better testHal Finkel2015-01-052-14/+7
| | | | | | | We now produce the desired code as noted in the README.txt file (no spurious or). Remove the README entry and improve the regression test. llvm-svn: 225214
* Use the integrated assembler by default on 32-bit PowerPC and SPARCBrad Smith2015-01-052-4/+2
| | | | llvm-svn: 225213
* Use the integrated assembler by default on 32-bit PowerPC and SPARCBrad Smith2015-01-054-31/+7
| | | | llvm-svn: 225212
* [PowerPC] Remove README.txt entryHal Finkel2015-01-051-34/+0
| | | | | | | This entry has been rendered irrelevant now that we have proper CR bit tracking. llvm-svn: 225211
* [Hexagon] Adding add/sub with carry, logical shift left by immediate and ↵Colin LeMahieu2015-01-055-226/+180
| | | | | | memop instructions. Removing old defs without bits and updating references. llvm-svn: 225210
* [PowerPC] Add a test for truncating a shifted loadHal Finkel2015-01-052-18/+18
| | | | | | | We now produce the desired code as noted in the README.txt file. Remove the README entry and add a regression test. llvm-svn: 225209
* Make DIE.h a public CodeGen header.Frederic Riss2015-01-0510-9/+9
| | | | | | | | | | | | | | dsymutil would like to use all the AsmPrinter/MCStreamer infrastructure to stream out the DWARF. In order to do so, it will reuse the DIE object and so this header needs to be public. The interface exposed here has some corners that cannot be used without a DwarfDebug object, but clients that want to stream Dwarf can just avoid these. Differential Revision: http://reviews.llvm.org/D6695 llvm-svn: 225208
* [dsymutil] Implement the BinaryHolder object and gain archive support.Frederic Riss2015-01-058-34/+265
| | | | | | | | | | | | | | | | | | | This object is meant to own the ObjectFiles and their underlying MemoryBuffer. It is basically the equivalent of an OwningBinary except that it efficiently handles Archives. It is optimized for efficiently providing mappings of members of the same archive when they are opened successively (which is standard in Darwin debug maps, objects from the same archive will be contiguous). Of course, the BinaryHolder will also be used by the DWARF linker once it is commited, but for now only the debug map parser uses it. With this change, you can run llvm-dsymutil on your Darwin debug build of clang and get a complete debug map for it. Differential Revision: http://reviews.llvm.org/D6690 llvm-svn: 225207
* [autoconf] llvm/cmake/modules/Makefile: Make sure to regenerate ↵NAKAMURA Takumi2015-01-051-1/+1
| | | | | | LLVMConfig.cmake whenever Makefile is updated. llvm-svn: 225206
* [PowerPC] Add another test for load/store with updateHal Finkel2015-01-052-34/+19
| | | | | | | We now produce the desired code as noted in the README.txt file. Remove the README entry and add a regression test. llvm-svn: 225205
* [autoconf] Export LLVM_LIBDIR_SUFFIX with empty string in LLVMConfig.cmake. ↵NAKAMURA Takumi2015-01-051-0/+1
| | | | | | tools/llvm-config is also doing so. llvm-svn: 225204
* [PowerPC] Fold i1 extensions with other opsHal Finkel2015-01-053-17/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Consider this function from our README.txt file: int foo(int a, int b) { return (a < b) << 4; } We now explicitly track CR bits by default, so the comment in the README.txt about not really having a SETCC is no longer accurate, but we did generate this somewhat silly code: cmpw 0, 3, 4 li 3, 0 li 12, 1 isel 3, 12, 3, 0 sldi 3, 3, 4 blr which generates the zext as a select between 0 and 1, and then shifts the result by a constant amount. Here we preprocess the DAG in order to fold the results of operations on an extension of an i1 value into the SELECT_I[48] pseudo instruction when the resulting constant can be materialized using one instruction (just like the 0 and 1). This was not implemented as a DAGCombine because the resulting code would have been anti-canonical and depends on replacing chained user nodes, which does not fit well into the lowering paradigm. Now we generate: cmpw 0, 3, 4 li 3, 0 li 12, 16 isel 3, 12, 3, 0 blr which is less silly. llvm-svn: 225203
* [X86][SSE] Fixed description for isSequentialOrUndefInRange. NFC.Simon Pilgrim2015-01-051-1/+1
| | | | llvm-svn: 225202
* [Hexagon] Adding rounding reg/reg variants, accumulating multiplies, and ↵Colin LeMahieu2015-01-054-57/+202
| | | | | | accumulating shifts. llvm-svn: 225201
* IR: Prune arguments to ValueAsMetadata::ValueAsMetadata()Duncan P. N. Exon Smith2015-01-052-7/+7
| | | | | | `LLVMContext` isn't actually used. llvm-svn: 225200
* [Hexagon] Adding V4 bit manipulating instructions, removing ALU defs without ↵Colin LeMahieu2015-01-053-251/+126
| | | | | | encoding bits. llvm-svn: 225199
OpenPOWER on IntegriCloud