Commit Graph

118574 Commits

Author SHA1 Message Date
Rafael Espindola
883d498abf Fix the build.
Sorry, I have no idea how grep failed to find this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240133 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19 14:34:12 +00:00
Rafael Espindola
2ba51f8c56 Replace EM_486 with EM_IAMCU.
This matches the current
http://www.sco.com/developers/gabi/latest/ch4.eheader.html#machine

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240132 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19 14:22:16 +00:00
Alexander Potapenko
e9149f4f8c [ASan] Initial support for Kernel AddressSanitizer
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240131 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19 12:19:07 +00:00
Rafael Espindola
ec77d9ad83 Make all temporary symbols unnamed.
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240130 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19 12:16:55 +00:00
Tobias Grosser
4b77d12064 IRBuilder: Add unit tests for construction of globals with address space
This was forgotten in r240113. Thanks Eric for paying attention.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240124 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19 07:19:17 +00:00
Filipe Cabecinhas
e2d0c66ce5 CMake: Stop using LLVM's custom parse_arguments (delete implementation). NFC
Summary:
Finally, delete LLVM's parse_arguments() definition.
Second part of D10531.

This is dependent on http://reviews.llvm.org/D10529

Reviewers: pcc, beanz, chapuni

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D10531

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240122 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19 03:45:42 +00:00
Filipe Cabecinhas
84b16655fd CMake: Stop using LLVM's custom parse_arguments. NFC
Summary:
Use CMake's cmake_parse_arguments() instead.
It's called in a slightly different way, but supports all our use cases.
It's in CMake 2.8.8, which is our minimum supported version.

CMake 3.0 doc (roughly the same. No direct link to 2.8.8 doc):
http://www.cmake.org/cmake/help/v3.0/module/CMakeParseArguments.html?highlight=cmake_parse_arguments

Reviewers: pcc, beanz, chapuni

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D10531

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240121 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19 03:45:40 +00:00
Ahmed Bougacha
ac655060b4 [ARM] Look through concat when lowering in-place shuffles (VZIP, ..)
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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240118 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19 02:32:35 +00:00
Ahmed Bougacha
1d01eeb9de [ARM] Factor out two-result shuffle matching. NFCI.
In preparation for a future patch: makes it easier to do the same
matching to generate different nodes, without duplication.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240116 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19 02:25:01 +00:00
Ahmed Bougacha
2120f5332b [ARM] Add D-sized vtrn/vuzp/vzip tests, and cleanup. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240114 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19 02:15:34 +00:00
Tobias Grosser
8921b2797f IRBuilder: Allow globals to be constructed in a specific address space
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240113 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19 02:12:07 +00:00
Eric Christopher
933d2bd391 Fix "the the" in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240112 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-19 01:53:21 +00:00
Alex Lorenz
875bc6105b MIR Serialization: Reenable one of the MIRParser tests by reverting r239805.
The test 'llvm/test/CodeGen/MIR/machine-function.mir' was disabled on 
x86 msc18 in r239805 as it failed. My commit r240054 have fixed the
problem, so this commit reverts the commit that disabled the test as
it should pass now. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240074 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 22:46:27 +00:00
Rafael Espindola
28b186f3cc Improve the --expand-relocs handling of MachO.
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240073 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 22:38:20 +00:00
Yi Jiang
d30c2356b0 Avoid redundant select node in early if-conversion pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240072 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 22:34:09 +00:00
Hans Wennborg
5caacef5c1 Switch lowering: enable whole-switch jump tables at -O0.
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240071 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 22:22:30 +00:00
Rafael Espindola
50cef0052f Pass --expand-relocs to a few more tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240069 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 22:12:47 +00:00
Sanjay Patel
b9b8054704 use SDValue bool operator; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240064 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 21:44:31 +00:00
Sanjay Patel
438a6a0608 add test to show suboptimal load merging behavior
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240063 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 21:34:26 +00:00
Simon Pilgrim
4ac9a2e70f [X86][SSE][CostModel] Fixed uitofp/sitofp cost target tests to specify sse2/avx2/avx512f directly instead of via a cpu model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240062 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 21:26:01 +00:00
Sanjay Patel
bc3868a11d fixed to test attributes and use better checks
1. Used update_llc_test_checks.py to tighten checks
2. Fixed triple (nothing Darwin-specific here)
3. Replaced CPU specifiers with attributes
4. Fixed comments
5. Removed IvyBridge run because it did not add any coverage



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240058 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 21:12:24 +00:00
Colin LeMahieu
05f80f4594 [Hexagon] Fixing unused field copypasta.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240055 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 21:03:13 +00:00
Alex Lorenz
5f0fc6da46 MIR Serialization: initialize the fields without the default initializers in yaml::MachineFunction
My commit r239790 which introduced serialization for simple machine function attributes didn't
initialize them when parsing because I have misread the documentation for YAML IO's mapOptional
method. The mapOptional method doesn't actually set the values to the values returned by the
default constructor for that type when the key value pair is missing, it just doesn't modify
those values, so they still contain the value that was set during initialization by the default
constructor. But the fields in yaml::MachineFunction with types like unsigned and bool are not
initialized by default, and thus they can still be uninitialized after mapOptional during parsing.
This commit adds default initialization for those fields to prevent this. 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240054 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 20:57:41 +00:00
Rafael Espindola
1be642839d Use --expand-relocs in a test. It will make the next change easier to read.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240053 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 20:57:35 +00:00
Colin LeMahieu
21e6bede12 [Hexagon] Printing packet brackets when asm printing and adding a number of tests that test packet brackets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240051 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 20:43:50 +00:00
Colin LeMahieu
4b61d2618c [MC] Adding prettyPrintAsm to MCTargetStreamer to allow targets to specialize how instructions are printed to asm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240050 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 20:43:22 +00:00
Reid Kleckner
edb6ecd65a [X86] Rename RegInfo to TRI as suggested by Eric
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240047 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 20:32:02 +00:00
Reid Kleckner
f4e002cbd0 [X86] Refactor stack adjustments into X86FrameLowering::BuildStackAdjustment
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240044 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 20:22:12 +00:00
Benjamin Kramer
ec7aa02d9f [BranchFolding] Replace custom MachineInstr with MachineInstrExpressionTrait
While the hash functions are subtly different it shouldn't have an
impact. Instructions are checked with isIdenticalTo later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240040 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 20:00:03 +00:00
Sanjoy Das
aabacb67c3 [CallGraph] Teach the CallGraph about non-leaf intrinsics.
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240039 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 19:28:26 +00:00
David Majnemer
6d136d7300 [CodeGen] Don't emit a random reference to the personality function
This should fix issues we've been seeing with Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240036 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 18:31:46 +00:00
Sanjay Patel
75a43c6c6b don't repeat function / variable names in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240035 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 18:28:20 +00:00
Reid Kleckner
e7e3ecdbf2 [X86] Remove unneeded parameters and deduplicate stack alignment code
NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240033 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 18:03:25 +00:00
Benjamin Kramer
bc3cb889cd [EliminateDuplicatePHINodes] Replace custom hash map with DenseSet.
While there use hash_combine instead of hand-rolled hashing. No
functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240023 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 16:01:00 +00:00
Sanjay Patel
fd246aa0b1 fix typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240022 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 15:53:33 +00:00
James Y Knight
d280420ee9 [SPARC] Repair GOT references to internal symbols.
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240020 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 15:05:15 +00:00
Rafael Espindola
f314160e32 Convert a few tests to use llvm-mc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240017 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 13:39:07 +00:00
Asaf Badouh
27a2741354 quick fix for failure from r.240012
failure:
http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/11847/steps/build_Lld/logs/stdio

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240015 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 12:57:24 +00:00
Simon Pilgrim
d492018dca [X86][AVX2] Added AVX2 SINT_TO_FP/UINT_TO_FP tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240013 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 12:32:28 +00:00
Asaf Badouh
bc5667c7ac [AVX512]
add instructions: VPAVGB and VPAVGW


review
http://reviews.llvm.org/D10504

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240012 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 12:30:53 +00:00
Daniel Jasper
5146cbf940 Update LLVM bindings after r239940. Apparently these aren't included in
any tests and I even don't know how to run the tests. This seems like a
minimal change to make them work again, although I can't really verify
at this point. Additionally, it probably makes sense to propagate the
personality parameter removal further.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240010 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 11:51:16 +00:00
Elena Demikhovsky
6c24289bef AVX-512: (fixed) Added encoding of all forms of VPERMT2W/D/Q/PS/PD and VPERMI2W/D/Q/PS/PD.
Intrinsics and tests for them are comming in the next patch.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240003 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 08:56:19 +00:00
Elena Demikhovsky
f3d6e24ca4 reverted 239999 due to test failures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240001 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 08:06:49 +00:00
Elena Demikhovsky
5686493ccc AVX-512: Added encoding of all forms of VPERMT2W/D/Q/PS/PD
and VPERMI2W/D/Q/PS/PD.
Intrinsics and tests for them are comming in the next patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239999 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 07:29:40 +00:00
Peter Collingbourne
e86e4ec406 LTO: Introduce LTOModule::getSymbolGV().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239993 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 05:10:06 +00:00
NAKAMURA Takumi
e520b7069e [autoconf] Detect OLE32 for mingw.
It has been done in CMake build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239989 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 04:16:05 +00:00
NAKAMURA Takumi
3c1e805769 config.h.*: Rework r210144. Don't edit config.h.in manually.
- Generate #include in configure.ac.
  - Resurrect the copy of llvm-config.h.cmake into config.h.cmake.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239987 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 04:08:20 +00:00
NAKAMURA Takumi
8c6343bf99 Reorder LLVM_ENABLE_ABI_BREAKING_CHECKS in llvm-config.h.*.
FIXME: Could we unify the description of LLVM_ENABLE_ABI_BREAKING_CHECKS between *.in and *.cmake?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239986 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 04:07:12 +00:00
Jingyue Wu
40ccf16b92 [NFC] more comments in SLSR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239984 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 03:35:57 +00:00
Peter Collingbourne
ce69bac886 Silence resource compiler using /nologo flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239983 91177308-0d34-0410-b5e6-96231b3b80d8
2015-06-18 01:15:18 +00:00