summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix the build.Rafael Espindola2015-06-191-1/+1
| | | | | | Sorry, I have no idea how grep failed to find this. llvm-svn: 240133
* [ASan] Initial support for Kernel AddressSanitizerAlexander Potapenko2015-06-191-42/+61
| | | | | | | | | This patch adds initial support for the -fsanitize=kernel-address flag to Clang. Right now it's quite restricted: only out-of-line instrumentation is supported, globals are not instrumented, some GCC kasan flags are not supported. Using this patch I am able to build and boot the KASan tree with LLVMLinux patches from github.com/ramosian-glider/kasan/tree/kasan_llvmlinux. To disable KASan instrumentation for a certain function attribute((no_sanitize("kernel-address"))) can be used. llvm-svn: 240131
* Make all temporary symbols unnamed.Rafael Espindola2015-06-193-19/+25
| | | | | | | | | | | | | | | | What this does is make all symbols that would otherwise start with a .L (or L on MachO) unnamed. Some of these symbols still show up in the symbol table, but we can just make them unnamed. In order to make sure we produce identical results when going thought assembly, all .L (not just the compiler produced ones), are now unnamed. Running llc on llvm-as.opt.bc, the peak memory usage goes from 208.24MB to 205.57MB. llvm-svn: 240130
* [ARM] Look through concat when lowering in-place shuffles (VZIP, ..)Ahmed Bougacha2015-06-191-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | Currently, we canonicalize shuffles that produce a result larger than their operands with: shuffle(concat(v1, undef), concat(v2, undef)) -> shuffle(concat(v1, v2), undef) because we can access quad vectors (see PerformVECTOR_SHUFFLECombine). This is useful in the general case, but there are special cases where native shuffles produce larger results: the two-result ops. We can look through the concat when lowering them: shuffle(concat(v1, v2), undef) -> concat(VZIP(v1, v2):0, :1) This lets us generate the native shuffles instead of scalarizing to dozens of VMOVs. Differential Revision: http://reviews.llvm.org/D10424 llvm-svn: 240118
* [ARM] Factor out two-result shuffle matching. NFCI.Ahmed Bougacha2015-06-191-26/+35
| | | | | | | In preparation for a future patch: makes it easier to do the same matching to generate different nodes, without duplication. llvm-svn: 240116
* IRBuilder: Allow globals to be constructed in a specific address spaceTobias Grosser2015-06-191-3/+5
| | | | llvm-svn: 240113
* Fix "the the" in comments.Eric Christopher2015-06-1919-21/+21
| | | | llvm-svn: 240112
* Improve the --expand-relocs handling of MachO.Rafael Espindola2015-06-181-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In a relocation target can take 3 basic forms * A r_value in scattered relocations. * A symbol in external relocations. * A section is non-external relocations. Have the dump reflect that. With this change we go from CHECK-NEXT: Extern: 0 CHECK-NEXT: Type: X86_64_RELOC_SUBTRACTOR (5) CHECK-NEXT: Symbol: 0x2 CHECK-NEXT: Scattered: 0 To just // CHECK-NEXT: Type: X86_64_RELOC_SUBTRACTOR (5) // CHECK-NEXT: Section: __data (2) Since the relocation is with a section, we print the seciton name and don't need to say that it is not scattered or external. Someone motivated can add further special cases for things like ARM64_RELOC_ADDEND and ARM_RELOC_PAIR. llvm-svn: 240073
* Avoid redundant select node in early if-conversion passYi Jiang2015-06-181-4/+13
| | | | llvm-svn: 240072
* Switch lowering: enable whole-switch jump tables at -O0.Hans Wennborg2015-06-181-15/+31
| | | | | | | | To same compile time, the analysis to find dense case-clusters in switches is not done at -O0. However, when the whole switch is dense enough, it is easy to turn it into a jump table, resulting in much faster code with no extra effort. llvm-svn: 240071
* use SDValue bool operator; NFCISanjay Patel2015-06-181-3/+2
| | | | llvm-svn: 240064
* [Hexagon] Fixing unused field copypasta.Colin LeMahieu2015-06-181-9/+3
| | | | llvm-svn: 240055
* [Hexagon] Printing packet brackets when asm printing and adding a number of ↵Colin LeMahieu2015-06-181-1/+63
| | | | | | tests that test packet brackets. llvm-svn: 240051
* [MC] Adding prettyPrintAsm to MCTargetStreamer to allow targets to ↵Colin LeMahieu2015-06-182-1/+10
| | | | | | specialize how instructions are printed to asm. llvm-svn: 240050
* [X86] Rename RegInfo to TRI as suggested by EricReid Kleckner2015-06-182-39/+39
| | | | llvm-svn: 240047
* [X86] Refactor stack adjustments into X86FrameLowering::BuildStackAdjustmentReid Kleckner2015-06-183-107/+93
| | | | | | | | Deduplicates some code and lets us use LEA on atom when adjusting the stack around callee-cleanup calls. This is the only intended functionality change. llvm-svn: 240044
* [BranchFolding] Replace custom MachineInstr with MachineInstrExpressionTraitBenjamin Kramer2015-06-181-46/+6
| | | | | | | While the hash functions are subtly different it shouldn't have an impact. Instructions are checked with isIdenticalTo later. llvm-svn: 240040
* [CallGraph] Teach the CallGraph about non-leaf intrinsics.Sanjoy Das2015-06-183-3/+19
| | | | | | | | | | | | | | | | | | | | Summary: Currently intrinsics don't affect the creation of the call graph. This is not accurate with respect to statepoint and patchpoint intrinsics -- these do call (or invoke) LLVM level functions. This change fixes this inconsistency by adding a call to the external node for call sites that call these non-leaf intrinsics. This coupled with the fact that these intrinsics also escape the function pointer they call gives us a conservatively correct call graph. Reviewers: reames, chandlerc, atrick, pgavlin Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D10526 llvm-svn: 240039
* [CodeGen] Don't emit a random reference to the personality functionDavid Majnemer2015-06-181-4/+0
| | | | | | This should fix issues we've been seeing with Darwin. llvm-svn: 240036
* [X86] Remove unneeded parameters and deduplicate stack alignment codeReid Kleckner2015-06-183-76/+67
| | | | | | NFC llvm-svn: 240033
* [EliminateDuplicatePHINodes] Replace custom hash map with DenseSet.Benjamin Kramer2015-06-181-51/+34
| | | | | | | While there use hash_combine instead of hand-rolled hashing. No functionality change intended. llvm-svn: 240023
* fix typo; NFCSanjay Patel2015-06-181-4/+4
| | | | llvm-svn: 240022
* [SPARC] Repair GOT references to internal symbols.James Y Knight2015-06-182-0/+34
| | | | | | | | | | They had been getting emitted as a section + offset reference, which is bogus since the value needs to be the offset within the GOT, not the actual address of the symbol's object. Differential Revision: http://reviews.llvm.org/D10441 llvm-svn: 240020
* quick fix for failure from r.240012Asaf Badouh2015-06-181-0/+1
| | | | | | | failure: http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/11847/steps/build_Lld/logs/stdio llvm-svn: 240015
* [AVX512]Asaf Badouh2015-06-184-2/+11
| | | | | | | | | | add instructions: VPAVGB and VPAVGW review http://reviews.llvm.org/D10504 llvm-svn: 240012
* AVX-512: (fixed) Added encoding of all forms of VPERMT2W/D/Q/PS/PD and ↵Elena Demikhovsky2015-06-181-107/+76
| | | | | | | | VPERMI2W/D/Q/PS/PD. Intrinsics and tests for them are comming in the next patch. llvm-svn: 240003
* reverted 239999 due to test failuresElena Demikhovsky2015-06-181-71/+107
| | | | llvm-svn: 240001
* AVX-512: Added encoding of all forms of VPERMT2W/D/Q/PS/PDElena Demikhovsky2015-06-181-107/+71
| | | | | | | and VPERMI2W/D/Q/PS/PD. Intrinsics and tests for them are comming in the next patch. llvm-svn: 239999
* [NFC] more comments in SLSRJingyue Wu2015-06-181-0/+9
| | | | llvm-svn: 239984
* [AsmPrinter] Make isRepeatedByteSequence smarter about odd integer typesBenjamin Kramer2015-06-171-26/+16
| | | | | | | | | | | | - zext the value to alloc size first, then check if the value repeats with zero padding included. If so we can still emit a .space - Do the checking with APInt.isSplat(8), which handles non-pow2 types - Also handle large constants (bit width > 64) - In a ConstantArray all elements have the same type, so it's sufficient to check the first constant recursively and then just compare if all following constants are the same by pointer compare llvm-svn: 239977
* [X86][SSE] Improved support for vector i16 to float conversions.Simon Pilgrim2015-06-171-8/+9
| | | | | | | | Added explicit sign extension for v4i16/v8i16 to v4i32/v8i32 before conversion to floats. Matches existing support for v4i8/v8i8. Follow up to D10433 llvm-svn: 239966
* Add NVPTXLowerAlloca pass to convert alloca'ed memory to local addressJingyue Wu2015-06-174-4/+122
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This is done by first adding two additional instructions to convert the alloca returned address to local and convert it back to generic. Then replace all uses of alloca instruction with the converted generic address. Then we can rely NVPTXFavorNonGenericAddrSpace pass to combine the generic addresscast and the corresponding Load, Store, Bitcast, GEP Instruction together. Patched by Xuetian Weng (xweng@google.com). Test Plan: test/CodeGen/NVPTX/lower-alloca.ll Reviewers: jholewinski, jingyue Reviewed By: jingyue Subscribers: meheff, broune, eliben, jholewinski, llvm-commits Differential Revision: http://reviews.llvm.org/D10483 llvm-svn: 239964
* Devirtualize and pack MCFragment to reduce memory usage.Pete Cooper2015-06-172-49/+79
| | | | | | | | | | | | | MCFragment didn't really need vtables. The majority of virtual methods were just getters and setters. This removes the vtables and uses dispatch on the kind to do things like delete which needs to get the appropriate class. This reduces memory on the verify use list order test case by about 2MB out of 800MB. Reviewed by Rafael Espíndola llvm-svn: 239952
* Re-land "[X86] Cache variables that only depend on the subtarget"Reid Kleckner2015-06-175-89/+64
| | | | | | Re-instates r239949 without accidentally flipping the sense of UseLEA. llvm-svn: 239950
* Revert "[X86] Cache variables that only depend on the subtarget"Reid Kleckner2015-06-175-64/+89
| | | | | | This reverts commit r239948, tests seem to be failing. llvm-svn: 239949
* [X86] Cache variables that only depend on the subtargetReid Kleckner2015-06-175-89/+64
| | | | | | | | | | | | | | There is a one-to-one relationship between X86Subtarget and X86FrameLowering, but every frame lowering method would previously pull the subtarget off the MachineFunction and query some subtarget properties. Over time, these locals began to grow in complexity and it became important to keep their names and meaning in sync across all of the frame lowering methods, leading to duplication. We can eliminate that duplication by computing them once in the constructor. llvm-svn: 239948
* [Bitcode] Replace hand-coded little endian handling with Endian.h functions.Benjamin Kramer2015-06-171-4/+1
| | | | | | No functional change intended. llvm-svn: 239944
* AMDGPU: Change unreachable into reported errorMatt Arsenault2015-06-171-2/+4
| | | | llvm-svn: 239943
* remove unnecessary casts; NFCSanjay Patel2015-06-171-4/+2
| | | | llvm-svn: 239942
* Move the personality function from LandingPadInst to FunctionDavid Majnemer2015-06-1725-140/+200
| | | | | | | | | | | | | | | | | | | The personality routine currently lives in the LandingPadInst. This isn't desirable because: - All LandingPadInsts in the same function must have the same personality routine. This means that each LandingPadInst beyond the first has an operand which produces no additional information. - There is ongoing work to introduce EH IR constructs other than LandingPadInst. Moving the personality routine off of any one particular Instruction and onto the parent function seems a lot better than have N different places a personality function can sneak onto an exceptional function. Differential Revision: http://reviews.llvm.org/D10429 llvm-svn: 239940
* [CodeGenPrepare] Generalize inserted set from truncs to any inst.Ahmed Bougacha2015-06-171-21/+28
| | | | | | | | | It's been used before to avoid infinite loops caused by separate CGP optimizations undoing one another. We found one more such issue caused by r238054. To avoid it, generalize the "InsertedTruncs" set to any inst, and use it to avoid touching those again. llvm-svn: 239938
* Move IsUsedInReloc from MCSymbolELF to MCSymbol.Rafael Espindola2015-06-174-26/+4
| | | | | | There is a free bit is MCSymbol and MachO needs the same information. llvm-svn: 239933
* LowerBitSets: Do not assign names to aliases of unnamed bitset element objects.Peter Collingbourne2015-06-171-3/+2
| | | | | | | The restriction on unnamed aliases was removed in r239921. Mostly reverts r239590, but we keep the test. llvm-svn: 239923
* Allow aliases to be unnamed.Rafael Espindola2015-06-173-8/+11
| | | | | | | | | | If globals can be unnamed, there is no reason for aliases to be different. The restriction was there since the original implementation in r36435. I can only guess it was there because of the old bison parser for the old alias syntax. llvm-svn: 239921
* Use a range loop. NFC.Rafael Espindola2015-06-171-16/+11
| | | | llvm-svn: 239919
* fix typos in comments; NFCSanjay Patel2015-06-171-2/+2
| | | | llvm-svn: 239916
* Add documentation for new backedge mass propagation in irregular loops.Diego Novillo2015-06-171-3/+2
| | | | | | Tweak test cases and rename headerIndexFor -> getHeaderIndex. llvm-svn: 239915
* Use named temporaries for directional labels.Rafael Espindola2015-06-171-9/+10
| | | | | | | | | | Directional labels can show up in symbol tables (and we have a llvm-mc test for that). Given that, we need to make sure they are named. With that out of the way, use setUseNamesOnTempLabels in llvm-mc so that it too benefits from the memory saving. llvm-svn: 239914
* [ArchiveWriter] Use EndianStream. No functional change intended.Benjamin Kramer2015-06-171-9/+4
| | | | llvm-svn: 239913
* [MC/Dwarf] Encode DW_CFA_advance_loc in target endianess.Benjamin Kramer2015-06-171-9/+8
| | | | | | This matches GNU as output. llvm-svn: 239911
OpenPOWER on IntegriCloud