summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [InstCombine] Add a new formula for SMIN.Sanjoy Das2015-04-301-0/+11
| | | | | | | | | | | | | | | | Summary: After this change `MatchSelectPattern` recognizes the following form of SMIN: Y >s C ? ~Y : ~C == ~Y <s ~C ? ~Y : ~C = SMIN(~Y, ~C) Reviewers: majnemer Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9352 llvm-svn: 236202
* Don't overflow GCTableFilipe Cabecinhas2015-04-301-1/+1
| | | | | | | | | | | | Summary: Bug found with AFL fuzz. Reviewers: rafael, dexonsmith Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D9361 llvm-svn: 236200
* Semantically revert r236031, which is not a good idea for in-order targets.Owen Anderson2015-04-301-31/+0
| | | | | | | | | | | | At the least it should be guarded by some kind of target hook. It also introduced catastrophic compile time and code quality regressions on some out of tree targets (test case still being reduced/sanitized). Sanjay agreed with reverting this patch until these issues can be resolved. llvm-svn: 236199
* Make sure Op->getType() is a PointerType before we cast<> it.Filipe Cabecinhas2015-04-301-0/+2
| | | | | | Bug found with AFL fuzz. llvm-svn: 236193
* Switch lowering: use profile info to build weight-balanced binary search treesHans Wennborg2015-04-301-7/+35
| | | | | | | | | | | | | | This will cause hot nodes to appear closer to the root. The literature says building the tree like this makes it a near-optimal (in terms of search time given key frequencies) binary search tree. In LLVM's case, we can do up to 3 comparisons in each leaf node, so it might be better to opt for lower tree height in some cases; that's something to look into in the future. Differential Revision: http://reviews.llvm.org/D9318 llvm-svn: 236192
* Make sure we don't resize(0) when we get a fwdref with Idx == UINT_MAXFilipe Cabecinhas2015-04-301-0/+4
| | | | | | | | Make it an error instead. Bug found with AFL fuzz. llvm-svn: 236190
* Store relocations in a map from MCSectionELF.Rafael Espindola2015-04-301-25/+21
| | | | | | Saves finding the MCSectionData just to do a map lookup. llvm-svn: 236189
* Write relocations directly to the output stream. NFC.Rafael Espindola2015-04-301-46/+29
| | | | llvm-svn: 236187
* Change x86 CMOVE_F to read it source, not write it.Pete Cooper2015-04-291-8/+8
| | | | | | | | | | This was breaking sqlite with the machine verifier because operand 0 was a def according to tablegen, but didn't have the 'isDef' flag set. Looking at the ISA, its clear that this operand is a source as writing to st(0) is implicit. So move the operand to the correct place in the td file. rdar://problem/20751584 llvm-svn: 236183
* [opaque pointer type] Store the value type of an allocaDavid Blaikie2015-04-292-10/+11
| | | | llvm-svn: 236175
* [WinEH] Start EH preparation for 32-bit x86, it uses no argumentsReid Kleckner2015-04-292-45/+94
| | | | | | | | | | | | | | | | | | 32-bit x86 MSVC-style exceptions are functionaly similar to 64-bit, but they take no arguments. Instead, they implicitly use the value of EBP passed in by the caller as a pointer to the parent's frame. In LLVM, we can represent this as llvm.frameaddress(1), and feed that into all of our calls to llvm.framerecover. The next steps are: - Add an alloca to the fs:00 linked list of handlers - Add something like llvm.sjlj.lsda or generalize it to store in the alloca - Move state number calculation to WinEHPrepare, arrange for FunctionLoweringInfo to call it - Use the state numbers to insert explicit loads and stores in the IR llvm-svn: 236172
* generalize binop reassociation; NFCSanjay Patel2015-04-291-17/+30
| | | | | | | | | | | | | Move the fold introduced in r236031: http://reviews.llvm.org/rL236031 to its own helper function, so we can use it for other binops. This is a preliminary step before partially solving: https://llvm.org/bugs/show_bug.cgi?id=21768 https://llvm.org/bugs/show_bug.cgi?id=23116 llvm-svn: 236171
* Run StatepointLowering.{cpp,h} through clang-format.Pat Gavlin2015-04-292-39/+28
| | | | llvm-svn: 236166
* [NFC] Converting to range-based for.Chris Bieneman2015-04-291-2/+1
| | | | llvm-svn: 236163
* [opaque pointer type] Pass GlobalAlias the actual pointer type rather than ↵David Blaikie2015-04-2910-46/+30
| | | | | | | | | | | | | decomposing it into pointee type + address space Many of the callers already have the pointer type anyway, and for the couple of callers that don't it's pretty easy to call PointerType::get on the pointee type and address space. This avoids LLParser from using PointerType::getElementType when parsing GlobalAliases from IR. llvm-svn: 236160
* Inline FragmentWriter into the only user.Rafael Espindola2015-04-291-18/+4
| | | | llvm-svn: 236158
* Write the symbol table directly to the output file.Rafael Espindola2015-04-291-79/+85
| | | | | | There is no need to first accumulate it in fragments. llvm-svn: 236157
* tidy up; NFCSanjay Patel2015-04-291-41/+28
| | | | llvm-svn: 236156
* Use pwrite to write the number of sections.Rafael Espindola2015-04-291-10/+15
| | | | | | | This avoids having to compute the number upfront, which will be used in the next patch. llvm-svn: 236153
* too much space again; NFCSanjay Patel2015-04-291-4/+0
| | | | llvm-svn: 236150
* Write the string table directly to the output file.Rafael Espindola2015-04-291-14/+22
| | | | | | There is no need to accumulate it in fragments first. llvm-svn: 236148
* too much space; NFCSanjay Patel2015-04-291-4/+0
| | | | llvm-svn: 236147
* [Sparc] Really add sparcel architecture support.Douglas Katzman2015-04-2913-60/+96
| | | | | | | | Mostly copy-and-paste from Sparc v8 architecture. Differential Revision: http://reviews.llvm.org/D8741 llvm-svn: 236146
* Write the section header string table directly to the output stream.Rafael Espindola2015-04-291-30/+38
| | | | | | | | | | Instead of accumulating the content in a fragment first, just write it to the output stream. Also put it first in the section table, so that we never have to worry about its index being >= SHN_LORESERVE. llvm-svn: 236145
* [AArch64] Refactor out codes that depend on specific CS save sequence.Manman Ren2015-04-291-19/+28
| | | | | | No functionality change. llvm-svn: 236143
* Avoid a few const_cast.Rafael Espindola2015-04-291-13/+12
| | | | llvm-svn: 236141
* ARM: mark branch-like instructions with correct flags.Tim Northover2015-04-291-0/+2
| | | | | | | | | | | | There's probably no way to test BXJ, but if the compiler ever did emit it during CodeGen it would have to be a block terminator so "isBranch" is appropriate. BLX is more tricky. Clearly a call, but it affects surprisingly little. rdar://18719544 llvm-svn: 236140
* New architecture name - 'sparcel' for Sparc little-endian.Douglas Katzman2015-04-291-0/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D9263 llvm-svn: 236139
* Make Sparc assembler accept parenthesized constant expressions.Douglas Katzman2015-04-291-0/+1
| | | | | | Differential Revision: http://reviews.llvm.org/D9087 llvm-svn: 236137
* [mips][microMIPSr6] Implement MUL, MUH, MULU and MUHU instructionsZoran Jovanovic2015-04-292-5/+17
| | | | | | Differential Revision: http://reviews.llvm.org/D8894 llvm-svn: 236131
* [WinEH] Fix minor bug in begincatch block splittingAndrew Kaylor2015-04-291-1/+1
| | | | llvm-svn: 236129
* Temporarily relax a check in the debug info verifier.Adrian Prantl2015-04-291-0/+9
| | | | | | | | | | | | The clang frontend helps out GDB by emitting the members of local anonymous unions as artificial local variables with shared storage. When SROA splits the storage for artificial local variables that are smaller than the entire union, the overhang piece will be outside of the allotted space for the variable and this check fails. rdar://problem/20730771 llvm-svn: 236124
* [X86] Avoid mangling frameescape labelsReid Kleckner2015-04-293-2/+12
| | | | | | | | | | | | | | x86 Windows uses the '_' prefix for all global symbols, and this was mistakenly being applied to frameescape labels, which are not externally visible global symbols. They use the private global prefix 'L'. The *right* way to fix this is probably to stop masquerading this label as an ExternalSymbol and create a new SDNode type. These labels are not "external", and we know they will be resolved by assembly time. Having a custom SDNode type would allow us to do better X86 address mode matching, so it's probably worth doing eventually. llvm-svn: 236123
* IR: Give 'DI' prefix to debug info metadataDuncan P. N. Exon Smith2015-04-2958-1173/+1169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Finish off PR23080 by renaming the debug info IR constructs from `MD*` to `DI*`. The last of the `DIDescriptor` classes were deleted in r235356, and the last of the related typedefs removed in r235413, so this has all baked for about a week. Note: If you have out-of-tree code (like a frontend), I recommend that you get everything compiling and tests passing with the *previous* commit before updating to this one. It'll be easier to keep track of what code is using the `DIDescriptor` hierarchy and what you've already updated, and I think you're extremely unlikely to insert bugs. YMMV of course. Back to *this* commit: I did this using the rename-md-di-nodes.sh upgrade script I've attached to PR23080 (both code and testcases) and filtered through clang-format-diff.py. I edited the tests for test/Assembler/invalid-generic-debug-node-*.ll by hand since the columns were off-by-three. It should work on your out-of-tree testcases (and code, if you've followed the advice in the previous paragraph). Some of the tests are in badly named files now (e.g., test/Assembler/invalid-mdcompositetype-missing-tag.ll should be 'dicompositetype'); I'll come back and move the files in a follow-up commit. llvm-svn: 236120
* CodeGen: Default overflow operations to expand so we don't have to assume ↵Jan Vesely2015-04-292-6/+8
| | | | | | | | | | targets are lying Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> Reviewed-by: ab Differential Revision: http://reviews.llvm.org/D9265 llvm-svn: 236119
* [mips][microMIPSr6] Implement SUB and SUBU instructionsZoran Jovanovic2015-04-291-0/+6
| | | | | | Differential Revision: http://reviews.llvm.org/D8764 llvm-svn: 236118
* [mips][microMIPSr6] Implement ADD, ADDU and ADDIU instructionsZoran Jovanovic2015-04-293-5/+43
| | | | | | Differential Revision: http://reviews.llvm.org/D8704 llvm-svn: 236111
* Sparc: Prefer reg+reg address encoding when only one register used.James Y Knight2015-04-291-5/+5
| | | | | | | | | | | Reg+%g0 is preferred to Reg+imm0 by the manual, and is what GCC produces. Futhermore, reg+imm is invalid for the (not yet supported) "alternate address space" instructions. Differential Revision: http://reviews.llvm.org/D8753 llvm-svn: 236107
* Mips fast-isel - handle functions which return i8 or i6 .Vasileios Kalintiris2015-04-292-8/+12
| | | | | | | | | | | | | | | | Summary: Allow Mips fast-isel to handle functions which return i8/i16 signed/unsigned. Test Plan: Make check tests are forthcoming. Already passes test-suite at O0/O2 for Mips 32 r1/r2 Reviewers: dsanders, rkotler Subscribers: llvm-commits, rfuhler Differential Revision: http://reviews.llvm.org/D6765 llvm-svn: 236103
* [mips] Correct 128-bit shifts on 64-bit targets.Daniel Sanders2015-04-291-5/+5
| | | | | | | | | | | | | | | | Summary: The existing code was correct for 32-bit GPR's but not 64-bit GPR's. It now accounts for both cases. Reviewers: vkalintiris Reviewed By: vkalintiris Subscribers: llvm-commits, mohit.bhakkad, sagar Differential Revision: http://reviews.llvm.org/D9337 llvm-svn: 236099
* [mips] [IAS] Inline assemble-time shifting out of createLShiftOri. NFC.Toma Tabacu2015-04-291-15/+24
| | | | | | | | | | | | | | | | Summary: Do the assemble-time shifts from createLShiftOri at the source, which groups all the shifting together, closer to the main logic path, and store the results in concisely-named variables to improve code clarity. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8973 llvm-svn: 236096
* fixed 80-chars; NFCElena Demikhovsky2015-04-291-5/+7
| | | | llvm-svn: 236093
* Fixed masked gather/scatter switch-caseElena Demikhovsky2015-04-291-0/+2
| | | | llvm-svn: 236092
* [TableGen] Use range-based for loops. NFC.Craig Topper2015-04-291-23/+9
| | | | llvm-svn: 236089
* [TableGen] Fold a couple dyn_casts into the ifs that check their results. NFCCraig Topper2015-04-291-11/+8
| | | | llvm-svn: 236088
* [TableGen] Replace some dyn_casts followed by an assert with just a regular ↵Craig Topper2015-04-292-25/+11
| | | | | | cast which asserts internally. NFC llvm-svn: 236087
* fixed comments, blanks, nullptr; NFCElena Demikhovsky2015-04-291-5/+4
| | | | llvm-svn: 236086
* [TableGen] Use range-based for loops. NFCCraig Topper2015-04-291-57/+28
| | | | llvm-svn: 236083
* Use an "early return" idiom for the error case. NFCFilipe Cabecinhas2015-04-291-8/+6
| | | | llvm-svn: 236080
* Check that we have a valid PointerType element type before calling get()Filipe Cabecinhas2015-04-291-1/+2
| | | | | | | | Same as r236073 but for PointerType. Bug found with AFL fuzz. llvm-svn: 236079
OpenPOWER on IntegriCloud