Hans Wennborg [Thu, 18 Jun 2015 22:22:30 +0000 (22:22 +0000)]
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
Rafael Espindola [Thu, 18 Jun 2015 22:12:47 +0000 (22:12 +0000)]
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
Sanjay Patel [Thu, 18 Jun 2015 21:44:31 +0000 (21:44 +0000)]
use SDValue bool operator; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240064
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 18 Jun 2015 21:34:26 +0000 (21:34 +0000)]
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
Simon Pilgrim [Thu, 18 Jun 2015 21:26:01 +0000 (21:26 +0000)]
[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
Sanjay Patel [Thu, 18 Jun 2015 21:12:24 +0000 (21:12 +0000)]
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
Colin LeMahieu [Thu, 18 Jun 2015 21:03:13 +0000 (21:03 +0000)]
[Hexagon] Fixing unused field copypasta.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240055
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Thu, 18 Jun 2015 20:57:41 +0000 (20:57 +0000)]
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
Rafael Espindola [Thu, 18 Jun 2015 20:57:35 +0000 (20:57 +0000)]
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
Colin LeMahieu [Thu, 18 Jun 2015 20:43:50 +0000 (20:43 +0000)]
[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
Colin LeMahieu [Thu, 18 Jun 2015 20:43:22 +0000 (20:43 +0000)]
[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
Reid Kleckner [Thu, 18 Jun 2015 20:32:02 +0000 (20:32 +0000)]
[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
Reid Kleckner [Thu, 18 Jun 2015 20:22:12 +0000 (20:22 +0000)]
[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
Benjamin Kramer [Thu, 18 Jun 2015 20:00:03 +0000 (20:00 +0000)]
[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
Sanjoy Das [Thu, 18 Jun 2015 19:28:26 +0000 (19:28 +0000)]
[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
David Majnemer [Thu, 18 Jun 2015 18:31:46 +0000 (18:31 +0000)]
[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
Sanjay Patel [Thu, 18 Jun 2015 18:28:20 +0000 (18:28 +0000)]
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
Reid Kleckner [Thu, 18 Jun 2015 18:03:25 +0000 (18:03 +0000)]
[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
Benjamin Kramer [Thu, 18 Jun 2015 16:01:00 +0000 (16:01 +0000)]
[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
Sanjay Patel [Thu, 18 Jun 2015 15:53:33 +0000 (15:53 +0000)]
fix typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240022
91177308-0d34-0410-b5e6-
96231b3b80d8
James Y Knight [Thu, 18 Jun 2015 15:05:15 +0000 (15:05 +0000)]
[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
Rafael Espindola [Thu, 18 Jun 2015 13:39:07 +0000 (13:39 +0000)]
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
Asaf Badouh [Thu, 18 Jun 2015 12:57:24 +0000 (12:57 +0000)]
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
Simon Pilgrim [Thu, 18 Jun 2015 12:32:28 +0000 (12:32 +0000)]
[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
Asaf Badouh [Thu, 18 Jun 2015 12:30:53 +0000 (12:30 +0000)]
[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
Daniel Jasper [Thu, 18 Jun 2015 11:51:16 +0000 (11:51 +0000)]
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
Elena Demikhovsky [Thu, 18 Jun 2015 08:56:19 +0000 (08:56 +0000)]
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
Elena Demikhovsky [Thu, 18 Jun 2015 08:06:49 +0000 (08:06 +0000)]
reverted 239999 due to test failures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240001
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Thu, 18 Jun 2015 07:29:40 +0000 (07:29 +0000)]
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
Peter Collingbourne [Thu, 18 Jun 2015 05:10:06 +0000 (05:10 +0000)]
LTO: Introduce LTOModule::getSymbolGV().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239993
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 18 Jun 2015 04:16:05 +0000 (04:16 +0000)]
[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
NAKAMURA Takumi [Thu, 18 Jun 2015 04:08:20 +0000 (04:08 +0000)]
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
NAKAMURA Takumi [Thu, 18 Jun 2015 04:07:12 +0000 (04:07 +0000)]
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
Jingyue Wu [Thu, 18 Jun 2015 03:35:57 +0000 (03:35 +0000)]
[NFC] more comments in SLSR
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239984
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 18 Jun 2015 01:15:18 +0000 (01:15 +0000)]
Silence resource compiler using /nologo flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239983
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 17 Jun 2015 23:55:17 +0000 (23:55 +0000)]
[AsmPrinter] Make isRepeatedByteSequence smarter about odd integer types
- 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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239977
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Wed, 17 Jun 2015 23:48:06 +0000 (23:48 +0000)]
Revert r239972 (YAML: Assign a value returned by the default constructor to the value in an optional mapping).
This change breaks clang-format tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239976
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Wed, 17 Jun 2015 23:26:01 +0000 (23:26 +0000)]
YAML: Assign a value returned by the default constructor to the value in an optional mapping.
This commit ensures that a value that's passed into YAML's IO mapOptional method
is going to be assigned a value returned by the default constructor for that
value's type when the appropriate key is not present in the YAML mapping.
Reviewers: Duncan P. N. Exon Smith
Differential Revision: http://reviews.llvm.org/D10492
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239972
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 17 Jun 2015 22:43:34 +0000 (22:43 +0000)]
[X86][SSE] Improved support for vector i16 to float conversions.
Added explicit sign extension for v4i16/v8i16 to v4i32/v8i32 before conversion to floats. Matches existing support for v4i8/v8i8.
Follow up to D10433
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239966
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Wed, 17 Jun 2015 22:31:02 +0000 (22:31 +0000)]
Add NVPTXLowerAlloca pass to convert alloca'ed memory to local address
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239964
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 17 Jun 2015 22:01:28 +0000 (22:01 +0000)]
Devirtualize and pack MCFragment to reduce memory usage.
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239952
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 17 Jun 2015 21:50:02 +0000 (21:50 +0000)]
Re-land "[X86] Cache variables that only depend on the subtarget"
Re-instates r239949 without accidentally flipping the sense of UseLEA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239950
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 17 Jun 2015 21:35:02 +0000 (21:35 +0000)]
Revert "[X86] Cache variables that only depend on the subtarget"
This reverts commit r239948, tests seem to be failing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239949
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 17 Jun 2015 21:31:17 +0000 (21:31 +0000)]
[X86] Cache variables that only depend on the subtarget
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239948
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 17 Jun 2015 21:21:16 +0000 (21:21 +0000)]
[docs] Fix "WARNING: Title underline too short."
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239947
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 17 Jun 2015 21:08:22 +0000 (21:08 +0000)]
Add missing include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239946
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 17 Jun 2015 20:55:30 +0000 (20:55 +0000)]
[Bitcode] Replace hand-coded little endian handling with Endian.h functions.
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239944
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 17 Jun 2015 20:55:25 +0000 (20:55 +0000)]
AMDGPU: Change unreachable into reported error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239943
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 17 Jun 2015 20:54:46 +0000 (20:54 +0000)]
remove unnecessary casts; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239942
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 17 Jun 2015 20:52:32 +0000 (20:52 +0000)]
Move the personality function from LandingPadInst to Function
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239940
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Wed, 17 Jun 2015 20:44:32 +0000 (20:44 +0000)]
[CodeGenPrepare] Generalize inserted set from truncs to any inst.
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239938
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 17 Jun 2015 20:29:33 +0000 (20:29 +0000)]
[Hexagon] Adding a number of other tests for min/max instructions and loading i1s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239935
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 17 Jun 2015 20:08:20 +0000 (20:08 +0000)]
Move IsUsedInReloc from MCSymbolELF to MCSymbol.
There is a free bit is MCSymbol and MachO needs the same information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239933
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 17 Jun 2015 18:31:02 +0000 (18:31 +0000)]
LowerBitSets: Do not assign names to aliases of unnamed bitset element objects.
The restriction on unnamed aliases was removed in r239921. Mostly reverts
r239590, but we keep the test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239923
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 17 Jun 2015 17:53:31 +0000 (17:53 +0000)]
Allow aliases to be unnamed.
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239921
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 17 Jun 2015 17:33:37 +0000 (17:33 +0000)]
Use a range loop. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239919
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 17 Jun 2015 17:19:05 +0000 (17:19 +0000)]
[Hexagon] Adding some compare tests, fixing existing XFAILed tests, and removing mcpu=hexagonv4 since that's the minimum version anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239917
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 17 Jun 2015 16:34:48 +0000 (16:34 +0000)]
fix typos in comments; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239916
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Wed, 17 Jun 2015 16:28:22 +0000 (16:28 +0000)]
Add documentation for new backedge mass propagation in irregular loops.
Tweak test cases and rename headerIndexFor -> getHeaderIndex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239915
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 17 Jun 2015 16:26:47 +0000 (16:26 +0000)]
Use named temporaries for directional labels.
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239914
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 17 Jun 2015 16:02:56 +0000 (16:02 +0000)]
[ArchiveWriter] Use EndianStream. No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239913
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 17 Jun 2015 15:14:35 +0000 (15:14 +0000)]
[MC/Dwarf] Encode DW_CFA_advance_loc in target endianess.
This matches GNU as output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239911
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Wed, 17 Jun 2015 14:31:51 +0000 (14:31 +0000)]
[mips] [IAS] Add support for expanding LASym with a source register operand.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9348
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239910
91177308-0d34-0410-b5e6-
96231b3b80d8
James Y Knight [Wed, 17 Jun 2015 13:53:12 +0000 (13:53 +0000)]
Tweak wording of alignment static_assert messages.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239907
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Wed, 17 Jun 2015 13:20:24 +0000 (13:20 +0000)]
[mips] [IAS] Add support for the B{L,G}{T,E}(U) branch pseudo-instructions.
Summary:
This does not include support for the immediate variants of these pseudo-instructions.
Fixes llvm.org/PR20968.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: seanbruno, emaste, llvm-commits
Differential Revision: http://reviews.llvm.org/D8537
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239905
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Wed, 17 Jun 2015 12:30:37 +0000 (12:30 +0000)]
[mips] [IAS] Fix LA with relative label operands.
Summary:
Call MCSymbolRefExpr::create() with a MCSymbol* argument, not with a StringRef
of the Symbol's name, in order to avoid creating invalid temporary symbols for
relative labels (e.g. {$,.L}tmp00, {$,.L}tmp10 etc.).
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10498
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239901
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Wed, 17 Jun 2015 11:46:37 +0000 (11:46 +0000)]
[mips] [IAS] Add test for SW with relative label operands. NFC.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10497
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239899
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Wed, 17 Jun 2015 11:31:18 +0000 (11:31 +0000)]
Remove empty directories left after r239657
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239898
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Wed, 17 Jun 2015 10:43:45 +0000 (10:43 +0000)]
[mips] [IAS] Fix LW with relative label operands.
Summary:
Previously, MCSymbolRefExpr::create() was called with a StringRef of the symbol
name, which it would then search for in the Symbols StringMap (from MCContext).
However, relative labels (which are temporary symbols) are apparently not stored
in the Symbols StringMap, so we end up creating a new {$,.L}tmp symbol
({$,.L}tmp00, {$,.L}tmp10 etc.) each time we create an MCSymbolRefExpr by
passing in the symbol name as a StringRef.
Fortunately, there is a version of MCSymbolRefExpr::create() which takes an
MCSymbol* and we already have an MCSymbol* at that point, so we can just pass
that in instead of the StringRef.
I also removed the local StringRef calls to MCSymbolRefExpr::create() from
expandMemInst(), as those cases can be handled by evaluateRelocExpr() anyway.
Reviewers: dsanders
Reviewed By: dsanders
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D9938
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239897
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Wed, 17 Jun 2015 07:23:57 +0000 (07:23 +0000)]
AVX-512: cvtusi2ss/d intrinsics.
Change builtin function name and signature ( add third parameter - rounding mode ).
Added tests for intrinsics.
Differential Revision: http://reviews.llvm.org/D10473
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239888
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 17 Jun 2015 07:21:41 +0000 (07:21 +0000)]
[PM/AA] Suffix lots of member variables that directly use enumeration
names for counts with the word 'Count' to make them less ambiguous.
This will be an actual error if we use unscoped enums for any of these,
and generally this seems much clearer to read.
Also, use clang-format to normalize the formatting of this code which
seems to have been needlessly odd.
No functionality changed here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239887
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 17 Jun 2015 07:21:38 +0000 (07:21 +0000)]
[PM/AA] Remove the UnknownSize static member from AliasAnalysis.
This is now living in MemoryLocation, which is what it pertains to. It
is also an enum there rather than a static data member which is left
never defined.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239886
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 17 Jun 2015 07:18:54 +0000 (07:18 +0000)]
[PM/AA] Remove the Location typedef from the AliasAnalysis class now
that it is its own entity in the form of MemoryLocation, and update all
the callers.
This is an entirely mechanical change. References to "Location" within
AA subclases become "MemoryLocation", and elsewhere
"AliasAnalysis::Location" becomes "MemoryLocation". Hope that helps
out-of-tree folks update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239885
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 17 Jun 2015 07:12:40 +0000 (07:12 +0000)]
[PM/AA] Split the location computation out of getArgLocation so the
virtual interface on AliasAnalysis only deals with ModRef information.
This interface was both computing memory locations by using TLI and
other tricks to estimate the size of memory referenced by an operand,
and computing ModRef information through similar investigations. This
change narrows the scope of the virtual interface on AliasAnalysis
slightly.
Note that all of this code could live in BasicAA, and be done with
a single investigation of the argument, if it weren't for the fact that
the generic code in AliasAnalysis::getModRefBehavior for a callsite
calls into the virtual aspect of (now) getArgModRefInfo. But this
patch's arrangement seems a not terrible way to go for now.
The other interesting wrinkle is how we could reasonably extend LLVM
with support for custom memory location sizes and mod/ref behavior for
library routines. After discussions with Hal on the review, the
conclusion is that this would be best done by fleshing out the much
desired support for extensions to TLI, and support these types of
queries in that interface where we would likely be doing other library
API recognition and analysis.
Differential Revision: http://reviews.llvm.org/D10259
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239884
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Wed, 17 Jun 2015 04:02:32 +0000 (04:02 +0000)]
Revert "AArch64: Use CMP;CCMP sequences for and/or/setcc trees."
The patch triggers a miscompile on SPEC 2006 403.gcc with the (ref)
200.i and scilab.i inputs. I opened PR23866 to track analysis of this.
This reverts commit r238793.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239880
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 17 Jun 2015 03:13:26 +0000 (03:13 +0000)]
Try to fix the MSVC build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239877
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Wed, 17 Jun 2015 03:06:16 +0000 (03:06 +0000)]
[Hexagon] Adding MC ELF streamer and updating addend relocation test which shows correct ELF symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239876
91177308-0d34-0410-b5e6-
96231b3b80d8
James Y Knight [Wed, 17 Jun 2015 01:21:20 +0000 (01:21 +0000)]
Fix alignment issues in LLVM.
Adds static_asserts to ensure alignment of concatenated objects is
correct, and fixes them where they are not.
Also changes the definition of AlignOf to use constexpr, except on
MSVC, to avoid enum comparison warnings from GCC.
(There's not too much of this in llvm itself, most of the fun is in
clang).
This seems to make LLVM actually work without Bus Error on 32bit
sparc.
Differential Revision: http://reviews.llvm.org/D10271
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239872
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 17 Jun 2015 01:15:47 +0000 (01:15 +0000)]
Handle forward referenced function when streaming bitcode.
Without this the included unit test would assert in
assert(BasicBlockFwdRefs.empty() && "Unresolved blockaddress fwd references");
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239871
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 17 Jun 2015 00:40:56 +0000 (00:40 +0000)]
Handle MaterializeAll in getLazyBitcodeModuleImpl. NFC.
This just handles both cases in the same place.
Extracted from a patch by Karl Schimpf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239870
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 16 Jun 2015 23:29:49 +0000 (23:29 +0000)]
Use std::unique_ptr to manage the DataStreamer in bitcode parsing.
We were already deleting it, this just makes it explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239867
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 16 Jun 2015 23:22:02 +0000 (23:22 +0000)]
Rename and improve emitSectionOffset.
Different object formats represent references from dwarf in different ways.
ELF uses a relocation to the referenced point (except for .dwo) and
COFF/MachO use the offset of the referenced point inside its section.
This patch renames emitSectionOffset because
* It doesn't produce an offset on ELF.
* It changes behavior depending on how DWARF is represented, so adding
dwarf to its name is probably a good thing.
The patch also adds an option to force the use of offsets.That avoids
funny looking code like
if (!UseOffsets)
Asm->emitSectionOffset....
It was correct, but read as if the ! was inverted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239866
91177308-0d34-0410-b5e6-
96231b3b80d8
Tyler Nowicki [Tue, 16 Jun 2015 22:59:45 +0000 (22:59 +0000)]
Refactor RecurrenceInstDesc
Moved RecurrenceInstDesc into RecurrenceDescriptor to simplify the namespaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239862
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 16 Jun 2015 22:37:50 +0000 (22:37 +0000)]
Add some tests based on PR21711
These were originally added in r227242,
but that patch was reverted because it
caused a failure on AArch64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239860
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 16 Jun 2015 22:27:55 +0000 (22:27 +0000)]
Return a unique_ptr from getLazyBitcodeModule and parseBitcodeFile. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239858
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Tue, 16 Jun 2015 21:47:43 +0000 (21:47 +0000)]
[llvm-readobj] Print MIPS .reginfo section content
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239856
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 16 Jun 2015 21:40:28 +0000 (21:40 +0000)]
[X86][SSE] Vectorize v2i32 to v2f64 conversions
This patch enables support for the conversion of v2i32 to v2f64 to use the CVTDQ2PD xmm instruction and stay on the SSE unit instead of scalarizing, sign extending to i64 and using CVTSI2SDQ scalar conversions.
Differential Revision: http://reviews.llvm.org/D10433
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239855
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 16 Jun 2015 20:47:19 +0000 (20:47 +0000)]
rename variables; NFC
...because I see 'StoreBW' and read it as 'store bandwidth'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239850
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 16 Jun 2015 20:24:25 +0000 (20:24 +0000)]
Reapply 239795 - [InstCombine] Propagate non-null facts to call parameters
The original change broke clang side tests. I will be submitting those momentarily. This change includes post commit feedback on the original change from from Pete Cooper.
Original Submission comments:
If a parameter to a function is known non-null, use the existing parameter attributes to record that fact at the call site. This has no optimization benefit by itself - that I know of - but is an enabling change for http://reviews.llvm.org/D9129.
Differential Revision: http://reviews.llvm.org/D9132
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239849
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 16 Jun 2015 20:05:00 +0000 (20:05 +0000)]
extract some code into a helper function for MergeConsecutiveStores(); NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239847
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 16 Jun 2015 20:03:39 +0000 (20:03 +0000)]
Improve handling of end of file in the bitcode reader.
Before this patch the bitcode reader would read a module from a file
that contained in order:
* Any number of non MODULE_BLOCK sub blocks.
* One MODULE_BLOCK
* Any number of non MODULE_BLOCK sub blocks.
* 4 '\n' characters to handle OS X's ranlib.
Since we support lazy reading of modules, any information that is relevant
for the module has to be in the MODULE_BLOCK or before it. We don't gain
anything from checking what is after.
This patch then changes the reader to stop once the MODULE_BLOCK has been
successfully parsed.
This avoids the ugly special case for .bc files in an archive and makes it
easier to embed bitcode files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239845
91177308-0d34-0410-b5e6-
96231b3b80d8
Diego Novillo [Tue, 16 Jun 2015 19:10:58 +0000 (19:10 +0000)]
Fix PR 23525 - Separate header mass propagation in irregular loops.
Summary:
When propagating mass through irregular loops, the mass flowing through
each loop header may not be equal. This was causing wrong frequencies
to be computed for irregular loop headers.
Fixed by keeping track of masses flowing through each of the headers in
an irregular loop. To do this, we now keep track of per-header backedge
weights. After the loop mass is distributed through the loop, the
backedge weights are used to re-distribute the loop mass to the loop
headers.
Since each backedge will have a mass proportional to the different
branch weights, the loop headers will end up with a more approximate
weight distribution (as opposed to the current distribution that assumes
that every loop header is the same).
Reviewers: dexonsmith
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D10348
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239843
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Tue, 16 Jun 2015 19:07:05 +0000 (19:07 +0000)]
[Statepoints] Test only change. Check that statepoint lowering didn't generate more than expected amount of spills.
See http://reviews.llvm.org/D10402 for related discussion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239842
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 16 Jun 2015 18:22:28 +0000 (18:22 +0000)]
VirtRegMap: Add undef flag when reading undefined subregisters.
While completely undefined registers are easy to catch and get their
<undef> flag early in ProcessImplicitDefs/RegisterCoalescer reading from
a partially defined register where just the subreg happens to be
undefined is harder to catch so we only add the undef flag in the
virtual register rewriting step.
No testcase as I cannot reproduce the problem on any of the in-tree targets at
the moment.
This fixes rdar://
21387089
Differential Revision: http://reviews.llvm.org/D10470
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239838
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 16 Jun 2015 18:22:26 +0000 (18:22 +0000)]
TargetRegisterInfo: Make the concept of imprecise lane masks explicit
LaneMasks as given by getSubRegIndexLaneMask() have a limited number of
of bits, so for targets with more than 31 disjunct subregister there may
be cases where:
getSubReg(Reg,A) does not overlap getSubReg(Reg,B)
but we still have
(getSubRegIndexLaneMask(A) & getSubRegIndexLaneMask(B)) != 0.
I had hoped to keep this an implementation detail of the tablegen but as
my next commit shows we can avoid unnecessary imp-defs operands if we
know that the lane masks in use are precise.
This is in preparation to http://reviews.llvm.org/D10470.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239837
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 16 Jun 2015 18:08:57 +0000 (18:08 +0000)]
[X86] Rename some frame lowering variables
Old names, new names, and what they really mean:
- IsWin64 -> IsWin64CC: This is true on non-Windows x86_64 platforms
when the ms_abi calling convention is used.
- IsWinEH -> IsWin64Prologue: True when the target is Win64, regardless
of calling convention. Changes the prologue to obey the constraints of
the Win64 unwinder.
- NeedsWinEH -> NeedsWinCFI: We're using the win64 prologue *and* the we
want .xdata unwind tables. Analogous to NeedsDwarfCFI.
NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239836
91177308-0d34-0410-b5e6-
96231b3b80d8
Tyler Nowicki [Tue, 16 Jun 2015 18:07:34 +0000 (18:07 +0000)]
Rename Reduction variables/structures to Recurrence.
A reduction is a special kind of recurrence. In the loop vectorizer we currently
identify basic reductions. Future patches will extend this to identifying basic
recurrences.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239835
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Tue, 16 Jun 2015 17:37:03 +0000 (17:37 +0000)]
Have MachOObjectFile::isValidArch() accept armv7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239833
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Tue, 16 Jun 2015 17:06:29 +0000 (17:06 +0000)]
MIR Parser: Report an error when a machine function doesn't have a corresponding function.
This commit reports an error when a machine function from a MIR file that contains
LLVM IR can't find a function with the same name in the loaded LLVM IR module.
Reviewers: Duncan P. N. Exon Smith
Differential Revision: http://reviews.llvm.org/D10468
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239831
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 16 Jun 2015 16:36:15 +0000 (16:36 +0000)]
Add a test for padded bitcode files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239829
91177308-0d34-0410-b5e6-
96231b3b80d8