Commit Graph

114074 Commits

Author SHA1 Message Date
David Blaikie
59efa0e9b9 [orc] Add a trivial unit test to get the ball rolling
I made my best guess at the Makefile, since I don't have a make build.

I'm not sure if it should be valid to add an empty list of things, but
it seemed the sort of degenerate case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230196 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-23 00:36:25 +00:00
David Majnemer
dad44db24c AsmParser: Call instructions can't have an alignment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230193 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-23 00:01:32 +00:00
David Majnemer
15cf92437a AsmParser: Check ConstantExpr GEP operands for validity
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230188 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 23:14:52 +00:00
David Majnemer
1f229009ed llvm-pdbdump: Fix gcc/clang build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230187 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 22:33:57 +00:00
Zachary Turner
86a84e3368 [llvm-pdbdump] Fix a few compilation failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230186 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 22:20:26 +00:00
David Blaikie
b0c9a66224 Add missing header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230185 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 22:18:55 +00:00
Zachary Turner
395adf9f89 [llvm-pdbdump] Rewrite dumper using visitor pattern.
This increases the flexibility of how to dump different
symbol types -- necessary for context-sensitive formatting of
symbol types -- and also improves the modularity by allowing
the dumping to be implemented in the actual dumper, as opposed
to in the PDB library.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230184 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 22:03:38 +00:00
Zachary Turner
e759e99a67 [llvm-pdbdump] Simplify options and output.
This removes a wealth of options, and instead now only provides
three options.  -symbols, -types, and -compilands.  This greatly
simplifies use of the tool, and makes it easier to understand
what you're going to see when you run the tool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230182 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 21:45:38 +00:00
David Blaikie
5606ca9edd Roll condition into an assert then wrap it 'ifndef NDEBUG' to protect from the inevitable "unused variable" warning in a non-asserts build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230181 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 20:58:38 +00:00
JF Bastien
8c253f7e88 Use common parse routine to read alignment values from bitcode
While fuzzing LLVM bitcode files, I discovered that (1) the bitcode reader doesn't check that alignments are no larger than 2**29; (2) downstream code doesn't check the range; and (3) for values out of range, corresponding large memory requests (based on alignment size) will fail. This code fixes the bitcode reader to check for valid alignments, fixing this problem.

This CL fixes alignment value on global variables, functions, and instructions: alloca, load, load atomic, store, store atomic.

Patch by Karl Schimpf (kschimpf@google.com).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230180 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 19:32:03 +00:00
Hal Finkel
67f22b7af9 [LICM] Refactor to expose functionality as utility functions
This refactors the core functionality of LICM: HoistRegion, SinkRegion and
PromoteAliasSet (renamed to promoteLoopAccessesToScalars) as utility functions
in LoopUtils. This will enable other transformations to make use of them
directly.

Patch by Ashutosh Nema.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230178 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 18:35:32 +00:00
Simon Pilgrim
66c960350c [DagCombiner] Generalized BuildVector Vector Concatenation
The CONCAT_VECTORS combiner pass can transform the concat of two BUILD_VECTOR nodes into a single BUILD_VECTOR node.

This patch generalises this to support any number of BUILD_VECTOR nodes, and also permits UNDEF nodes to be included as well.

This was noticed as AVX vec128 -> vec256 canonicalization sometimes creates a CONCAT_VECTOR with a real vec128 lower and an vec128 UNDEF upper.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230177 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 18:17:28 +00:00
Hal Finkel
0e8abfa6ed [DAGCombine] Don't assume integer-type legailty in reduceBuildVecConvertToConvertBuildVec
DAGCombine will rewrite an BUILD_VECTOR where all non-undef inputs some from
[US]INT_TO_FP, as a BUILD_VECTOR of integers with the conversion applied as a
vector operation. We check operation legality of the conversion, but fail to
check legality of the integer vector type itself. Because targets don't
normally override operation legality defaults for illegal types, we need to
check this also.

This came up in the context of the QPX vector entensions for PowerPC (which can
have legal floating-point vector types without corresponding legal integer
vector types). No in-tree test case for this yes, but one can be added once
the QPX support has been committed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230176 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 16:10:22 +00:00
Hal Finkel
1584f114c1 [SDAG] Use correct alignments on expanded vector trunc-store/ext-loads
When expanding a truncating store or extending load using vector extracts or
inserts and scalar stores and loads, we were giving each of these scalar stores
or loads the same alignment as the original vector operation. While this will
often be right (most vector operations, especially those produced by
autovectorization, have the alignment of the underlying scalar type), the
vector operation could certainly have a larger alignment.

No test case (yet); noticed by inspection.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230175 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 15:58:04 +00:00
NAKAMURA Takumi
d40ce7ac2b Fix a warning on HexagonMCCodeEmitter::MCII. [-Wunused-private-field]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230170 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 09:58:29 +00:00
NAKAMURA Takumi
2aabd71b8a RewriteStatepointsForGC.cpp: Fix for -Asserts to mark isNullConstant() as LLVM_ATTRIBUTE_UNUSED. [-Wunused-function]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230169 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 09:58:19 +00:00
NAKAMURA Takumi
572d35cc19 RewriteStatepointsForGC.cpp: Fix for -Asserts. [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230168 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 09:58:13 +00:00
NAKAMURA Takumi
9c2a703d7c LowerBitSets.cpp: Prune incorrect \param(s). [-Wdocumentation]
\param should be used as itemized.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230167 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 09:51:42 +00:00
Craig Topper
f9c1605d56 [X86] Add some missing redundant MMX and SSE encodings for disassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230165 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 07:50:41 +00:00
Zachary Turner
855cb47fae Remove log statements from config scripts.
The bots seem to be happy now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230164 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 07:31:42 +00:00
Zachary Turner
69fadae872 Really fix the build this time.
I was setting the python variable to "@HAVE_DIA_SDK@", which will
always be a string, and will always evaluate to True.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230163 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 07:13:52 +00:00
Zachary Turner
ca27e720c3 Attempt to fix the builders.
The issue was that the test Makefile had not been updated to
provide a value for HAVE_DIA_SDK, so it was being initialized
incorrectly.  Hopefully this brings everything back to green.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230162 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 07:01:41 +00:00
Zachary Turner
eec34e5ed4 [llvm-pdbdump] Resubmit "Add some tests for llvm-pdbdump".
NOTE: This patch intentionally breaks the build.  It attempts
to resubmit r230083, but with some debug logging in the CMake
and lit config files to determine why certain bots do not
correctly disable the DIA tests when DIA is not available.

After a sufficient number of bots fail, this patch will either
be reverted or, if the cause of the failure becomes obvious,
a fix submitted with the log statements removed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230161 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 06:47:32 +00:00
David Majnemer
ff7a64eb3a COFF: Add 'IMAGE_SCN_CNT_INITIALIZED_DATA' to all DWARF sections
The CodeView debug info section, .debug$S, also has this set.  MinGW
sets this bit for their DWARF sections as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230156 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 02:35:27 +00:00
David Majnemer
f68ceb2e58 COFF: Consistently format the DWARF sections
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230155 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 02:35:22 +00:00
Lang Hames
5ce69d8c40 [Orc] Remove redundant using directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230154 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 01:48:23 +00:00
Lang Hames
a2184e96e6 [Orc] Add header comment to IndirectionUtils.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230153 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-22 01:45:31 +00:00
Sanjoy Das
b9b88bd77b IRCE: generalize InductiveRangeCheck::computeSafeIterationSpace to
work with a non-canonical induction variable.

This is currently a non-functional change because we only ever call
computeSafeIterationSpace on a canonical induction variable; but the
generalization will be useful in a later commit.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230151 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 22:20:22 +00:00
Sanjoy Das
c5e1132ac2 IRCE: use SCEVs instead of llvm::Value's for intermediate
calculations.  Semantically non-functional change.

This gets rid of some of the SCEV -> Value -> SCEV round tripping and
the Construct(SMin|SMax)Of and MaybeSimplify helper routines.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230150 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 22:07:32 +00:00
Matt Arsenault
29f97a6c46 R600/SI: Use v_madmk_f32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230149 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 21:29:10 +00:00
Matt Arsenault
c490f78e53 R600/SI: Try to use v_madak_f32
This is a code size optimization when the constant
only has one use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230148 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 21:29:07 +00:00
Matt Arsenault
9036390498 R600/SI: Don't crash when getting immediate operand size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230147 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 21:29:04 +00:00
Matt Arsenault
dc9d5dcdd7 R600/SI: Fix mad*k definitions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230146 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 21:29:00 +00:00
Simon Pilgrim
b430a06e94 [X86][SSE] Added shuffle based integer zero extension tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230145 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 21:25:16 +00:00
Justin Bogner
ad821f0482 docs: Mention that assertions must be enabled to use the -stats flag
Patch by Rob Stewart. Thanks!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230144 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 20:53:36 +00:00
Lang Hames
8d353ae157 [Orc] Move Orc code into a namespace (llvm::orc), update Kaleidoscope code.
NFC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230143 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 20:44:36 +00:00
Benjamin Kramer
59d81dbafb MachineInstr: Use range-based for loops. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230142 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 17:08:08 +00:00
Benjamin Kramer
7efcb3338c Calling memmove on a MachineOperand is totally safe.
While it's not POD due to the user-defined constructor, it's still a trivially
copyable type. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230141 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 16:22:48 +00:00
Benjamin Kramer
2b17108064 Remove dead prototype.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230137 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 14:35:00 +00:00
Benjamin Kramer
edf99a5e3f X86: Remove custom lowering of SIGN_EXTEND_INREG
This was just replicating logic from the legalizer. Covered by existing
tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230136 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 14:31:29 +00:00
Eric Christopher
9abdfd0170 Unconditionally create a new MCInstrInfo in the asm printer for
asm parsing since it's not subtarget dependent and we can't depend
upon the one hanging off the MachineFunction's subtarget still
being around.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230135 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 09:09:15 +00:00
Eric Christopher
9494699d5e Remove obsolete comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230134 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 08:48:23 +00:00
Eric Christopher
113747defd Have the MipsAsmPrinter fp stub emission code take a custom
MCSubtargetInfo as the MachineFunction has gone away and we need
to emit code at the module level.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230133 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 08:48:22 +00:00
Eric Christopher
68992caa2e Turn an if+llvm_unreachable into an assert and reword comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230132 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 08:32:38 +00:00
Eric Christopher
3a389c6950 Endianness can be gotten from the DataLayout which we already
have. Also, the subtarget is invalid at this point.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230131 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 08:32:22 +00:00
David Majnemer
164db1c6b9 X86: Call __main using the SelectionDAG
Synthesizing a call directly using the MI layer would confuse the frame
lowering code.  This is problematic as frame lowering is highly
sensitive the particularities of calls, etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230129 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 05:49:45 +00:00
Shankar Easwaran
5872174fd8 [obj2yaml/yaml2obj] Add SHT_GROUP support.
This adds section group support to the tools obj2yaml and yaml2obj.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230124 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 04:28:26 +00:00
Davide Italiano
a983427f67 Small cleanup. Don't use else when not needed.
Pointed out by David Majnemer.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230122 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 02:36:54 +00:00
Tim Northover
ca7e0787f0 CodeGen: convert CCState interface to using ArrayRefs
Everyone except R600 was manually passing the length of a static array
at each callsite, calculated in a variety of interesting ways. Far
easier to let ArrayRef handle that.

There should be no functional change, but out of tree targets may have
to tweak their calls as with these examples.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230118 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 02:11:17 +00:00
David Majnemer
e95985d3a0 Win64: Stack alignment constraints aren't applied during SET_FPREG
Stack realignment occurs after the prolog, not during, for Win64.
Because of this, don't factor in the maximum stack alignment when
establishing a frame pointer.

This fixes PR22572.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230113 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-21 01:04:47 +00:00