Andrew Kaylor [Mon, 23 Feb 2015 21:03:30 +0000 (21:03 +0000)]
Removing unused private field.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230259
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Mon, 23 Feb 2015 20:57:46 +0000 (20:57 +0000)]
[X86][MMX] Fix test to reflect current codegen
This test failed in several buildbots, a bit unclear how that happen
since this was the previous behavior before r230248.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230258
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Mon, 23 Feb 2015 20:44:34 +0000 (20:44 +0000)]
Second attempt to fix WinEHCatchDirector build failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230257
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Mon, 23 Feb 2015 20:19:15 +0000 (20:19 +0000)]
Attempting to fix WinEHCatchDirector destructor related build failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230252
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Mon, 23 Feb 2015 20:04:51 +0000 (20:04 +0000)]
Adding test for Windows EH frame variable remapping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230250
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Mon, 23 Feb 2015 20:01:56 +0000 (20:01 +0000)]
Remap frame variables for native Windows exception handling.
Differential Revision: http://reviews.llvm.org/D7770
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230249
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Mon, 23 Feb 2015 19:53:37 +0000 (19:53 +0000)]
Revert "[X86][MMX] Add MMX instructions to foldable tables"
This reverts commit r230226 since it breaks win buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230248
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 23 Feb 2015 19:34:04 +0000 (19:34 +0000)]
Revert "Revert "Raising minimum required CMake version to 2.8.12.2.""
This reverts commit r230240, which was an accidental commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230246
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 23 Feb 2015 19:28:45 +0000 (19:28 +0000)]
Rewrite the global merge pass to be subprogram agnostic for now.
It was previously using the subtarget to get values for the global
offset without actually checking each function as it was generating
code. Go ahead and solidify the current behavior and make the
existing FIXMEs more prominent.
As a note the ARM backend previously had a thumb1 and non-thumb1
set of defaults. Only the former was tested so I've changed the
behavior to only use that for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230245
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 23 Feb 2015 19:15:16 +0000 (19:15 +0000)]
Prevent hoisting fmul from THEN/ELSE to IF if there is fmsub/fmadd opportunity.
This patch adds the isProfitableToHoist API. For AArch64, we want to prevent a
fmul from being hoisted in cases where it is more profitable to form a
fmsub/fmadd.
Phabricator Review: http://reviews.llvm.org/D7299
Patch by Lawrence Hu <lawrence@codeaurora.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230241
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 23 Feb 2015 19:15:08 +0000 (19:15 +0000)]
Revert "Raising minimum required CMake version to 2.8.12.2."
This reverts commit
247aed4710e8befde76da42b27313661dea7cf66.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230240
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Mon, 23 Feb 2015 19:07:25 +0000 (19:07 +0000)]
cmake: Don't do the libstdc++ version check when clang simulates MSVC
If we're using clang-cl, that's a pretty good indication that we're
going to use MSVC's STL.
This simplifies the clang-cl ninja self-host configuration down to:
CC=clang-cl CXX=clang-cl cmake .. -GNinja
Modified version of zturner's patch:
Differential Revision: http://reviews.llvm.org/D7824
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230239
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Mon, 23 Feb 2015 18:30:25 +0000 (18:30 +0000)]
InstSimplify: simplify 0 / X if nnan and nsz
From: Fiona Glaser <fglaser@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230238
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 23 Feb 2015 17:22:16 +0000 (17:22 +0000)]
[mips] Honour -mno-odd-spreg for vector insert/extract when MSA is enabled.
Summary:
-mno-odd-spreg prohibits the use of odd-numbered single-precision floating
point registers. However, vector insert/extract was still using them when
manipulating the subregisters of an MSA register. Fixed this by ensuring
that insertion/extraction is only performed on even-numbered vector
registers when -mno-odd-spreg is given.
Reviewers: vmedic, sstankovic
Reviewed By: sstankovic
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7672
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230235
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 23 Feb 2015 16:57:19 +0000 (16:57 +0000)]
Fix incorrect immediate size for AddrModeT2_i8s4 in rewriteT2FrameIndex.
The natural way to handle this addressing mode would be to say that it has
8 bits and gets scaled by 4, but since the MC layer is expecting the scaling
to be already reflected in the immediate value, we have been setting the
Scale to 1. That's fine, but then NumBits needs to be adjusted to reflect
the effective increase in the range of the immediate. That adjustment was
missing.
The consequence is that the register scavenger can fail.
The estimateRSStackSizeLimit() function in ARMFrameLowering.cpp correctly
assumes that the AddrModeT2_i8s4 address mode can handle scaled offsets up to
1020. Under just the right circumstances, we fail to reserve space for the
scavenger because it thinks that nothing will be needed. However, the overly
pessimistic behavior in rewriteT2FrameIndex causes some frame indexes to be
out of range and require scavenged registers, and so the scavenger asserts.
Unfortunately I have not been able to come up with a testcase for this. I
can only reproduce it on an internal branch where the frame layout and
register allocation is slightly different than trunk. We really need a
way to serialize MachineInstr-level IR to write reasonable tests for things
like this.
rdar://problem/
19909005
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230233
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 23 Feb 2015 16:41:36 +0000 (16:41 +0000)]
Sync the __builtin_expects for our 3 quadratically probed hash table implementations.
This assumes that
a) finding the bucket containing the value is LIKELY
b) finding an empty bucket is LIKELY
c) growing the table is UNLIKELY
I also switched the a) and b) cases for SmallPtrSet as we seem to use
the set mostly more for insertion than for checking existence.
In a simple benchmark consisting of 2^21 insertions of 2^20 unique
pointers into a DenseMap or SmallPtrSet a few percent speedup on average,
but nothing statistically significant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230232
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Mon, 23 Feb 2015 15:33:40 +0000 (15:33 +0000)]
[X86] Add specific mtriple in order to appease builbots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230229
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Mon, 23 Feb 2015 15:23:22 +0000 (15:23 +0000)]
[X86][MMX] Add MMX instructions to foldable tables
Teach the peephole optimizer to work with MMX instructions by adding
entries into the foldable tables. This covers folding opportunities not
handled during isel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230226
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Mon, 23 Feb 2015 15:23:14 +0000 (15:23 +0000)]
[X86][MMX] Support folding loads in psll, psrl and psra intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230225
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Mon, 23 Feb 2015 15:23:06 +0000 (15:23 +0000)]
[X86][MMX] Add tests for pslli, psrli and psrai intrinsics
Add tests to cover the RR form of the pslli, psrli and psrai intrinsics.
In the next commit, the loads are going to be folded and the
instructions use the RM form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230224
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Mon, 23 Feb 2015 15:12:31 +0000 (15:12 +0000)]
AVX-512: recommitted 229837 + bugfix + test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230223
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Mon, 23 Feb 2015 14:14:02 +0000 (14:14 +0000)]
restructured X86 scalar unary operation templates
I made the templates general, no need to define pattern separately for each instruction/intrinsic.
Now only need to add r_Int pattern for AVX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230221
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 23 Feb 2015 11:33:54 +0000 (11:33 +0000)]
[llvm-pdbdump] Remove unused variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230216
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 23 Feb 2015 11:12:52 +0000 (11:12 +0000)]
Orc/JITSymbol.h requires not "Compiler.h" but "DataTypes.h" due to uint64_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230214
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 23 Feb 2015 07:13:52 +0000 (07:13 +0000)]
AsmParser: Check ConstantExpr insertvalue operands for type correctness
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230206
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 23 Feb 2015 06:13:27 +0000 (06:13 +0000)]
[llvm-pdbdump] Fix builders again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230205
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 23 Feb 2015 05:59:14 +0000 (05:59 +0000)]
[llvm-pdbdump] Very minor code cleanup.
This just removes some dead enums as well as some debug flushes
of stdout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230204
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 23 Feb 2015 05:58:34 +0000 (05:58 +0000)]
[llvm-pdbdump] Add an option to dump full class definitions.
This adds the --class-definitions flag. If specified, when dumping
types, instead of "class Foo" you will see the full class definition,
with member functions, constructors, access specifiers.
NOTE: Using this option can be very slow, as generating a full class
definition requires accessing many different parts of the PDB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230203
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 23 Feb 2015 04:45:05 +0000 (04:45 +0000)]
[Orc][Kaleidoscope] Tidy up the lazy_irgen tutorial, touch up a couple of
comments in the fully_lazy tutorial to minimize the diff between the two.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230202
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 23 Feb 2015 04:34:43 +0000 (04:34 +0000)]
[Orc][Kaleidoscope] Remove dead AST map in SessionContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230201
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 23 Feb 2015 03:31:29 +0000 (03:31 +0000)]
Try to fix reST markup for an external link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230200
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 23 Feb 2015 00:53:35 +0000 (00:53 +0000)]
Fix Makefile build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230197
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 23 Feb 2015 00:36:25 +0000 (00:36 +0000)]
[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
David Majnemer [Mon, 23 Feb 2015 00:01:32 +0000 (00:01 +0000)]
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
David Majnemer [Sun, 22 Feb 2015 23:14:52 +0000 (23:14 +0000)]
AsmParser: Check ConstantExpr GEP operands for validity
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230188
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sun, 22 Feb 2015 22:33:57 +0000 (22:33 +0000)]
llvm-pdbdump: Fix gcc/clang build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230187
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sun, 22 Feb 2015 22:20:26 +0000 (22:20 +0000)]
[llvm-pdbdump] Fix a few compilation failures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230186
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Sun, 22 Feb 2015 22:18:55 +0000 (22:18 +0000)]
Add missing header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230185
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Sun, 22 Feb 2015 22:03:38 +0000 (22:03 +0000)]
[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
Zachary Turner [Sun, 22 Feb 2015 21:45:38 +0000 (21:45 +0000)]
[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
David Blaikie [Sun, 22 Feb 2015 20:58:38 +0000 (20:58 +0000)]
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
JF Bastien [Sun, 22 Feb 2015 19:32:03 +0000 (19:32 +0000)]
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
Hal Finkel [Sun, 22 Feb 2015 18:35:32 +0000 (18:35 +0000)]
[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
Simon Pilgrim [Sun, 22 Feb 2015 18:17:28 +0000 (18:17 +0000)]
[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
Hal Finkel [Sun, 22 Feb 2015 16:10:22 +0000 (16:10 +0000)]
[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
Hal Finkel [Sun, 22 Feb 2015 15:58:04 +0000 (15:58 +0000)]
[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
NAKAMURA Takumi [Sun, 22 Feb 2015 09:58:29 +0000 (09:58 +0000)]
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
NAKAMURA Takumi [Sun, 22 Feb 2015 09:58:19 +0000 (09:58 +0000)]
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
NAKAMURA Takumi [Sun, 22 Feb 2015 09:58:13 +0000 (09:58 +0000)]
RewriteStatepointsForGC.cpp: Fix for -Asserts. [-Wunused-variable]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230168
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 22 Feb 2015 09:51:42 +0000 (09:51 +0000)]
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
Craig Topper [Sun, 22 Feb 2015 07:50:41 +0000 (07:50 +0000)]
[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
Zachary Turner [Sun, 22 Feb 2015 07:31:42 +0000 (07:31 +0000)]
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
Zachary Turner [Sun, 22 Feb 2015 07:13:52 +0000 (07:13 +0000)]
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
Zachary Turner [Sun, 22 Feb 2015 07:01:41 +0000 (07:01 +0000)]
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
Zachary Turner [Sun, 22 Feb 2015 06:47:32 +0000 (06:47 +0000)]
[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
David Majnemer [Sun, 22 Feb 2015 02:35:27 +0000 (02:35 +0000)]
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
David Majnemer [Sun, 22 Feb 2015 02:35:22 +0000 (02:35 +0000)]
COFF: Consistently format the DWARF sections
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230155
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 22 Feb 2015 01:48:23 +0000 (01:48 +0000)]
[Orc] Remove redundant using directive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230154
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sun, 22 Feb 2015 01:45:31 +0000 (01:45 +0000)]
[Orc] Add header comment to IndirectionUtils.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230153
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sat, 21 Feb 2015 22:20:22 +0000 (22:20 +0000)]
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
Sanjoy Das [Sat, 21 Feb 2015 22:07:32 +0000 (22:07 +0000)]
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
Matt Arsenault [Sat, 21 Feb 2015 21:29:10 +0000 (21:29 +0000)]
R600/SI: Use v_madmk_f32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230149
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 21 Feb 2015 21:29:07 +0000 (21:29 +0000)]
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
Matt Arsenault [Sat, 21 Feb 2015 21:29:04 +0000 (21:29 +0000)]
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
Matt Arsenault [Sat, 21 Feb 2015 21:29:00 +0000 (21:29 +0000)]
R600/SI: Fix mad*k definitions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230146
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 21 Feb 2015 21:25:16 +0000 (21:25 +0000)]
[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
Justin Bogner [Sat, 21 Feb 2015 20:53:36 +0000 (20:53 +0000)]
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
Lang Hames [Sat, 21 Feb 2015 20:44:36 +0000 (20:44 +0000)]
[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
Benjamin Kramer [Sat, 21 Feb 2015 17:08:08 +0000 (17:08 +0000)]
MachineInstr: Use range-based for loops. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230142
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 21 Feb 2015 16:22:48 +0000 (16:22 +0000)]
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
Benjamin Kramer [Sat, 21 Feb 2015 14:35:00 +0000 (14:35 +0000)]
Remove dead prototype.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230137
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 21 Feb 2015 14:31:29 +0000 (14:31 +0000)]
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
Eric Christopher [Sat, 21 Feb 2015 09:09:15 +0000 (09:09 +0000)]
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
Eric Christopher [Sat, 21 Feb 2015 08:48:23 +0000 (08:48 +0000)]
Remove obsolete comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230134
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 21 Feb 2015 08:48:22 +0000 (08:48 +0000)]
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
Eric Christopher [Sat, 21 Feb 2015 08:32:38 +0000 (08:32 +0000)]
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
Eric Christopher [Sat, 21 Feb 2015 08:32:22 +0000 (08:32 +0000)]
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
David Majnemer [Sat, 21 Feb 2015 05:49:45 +0000 (05:49 +0000)]
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
Shankar Easwaran [Sat, 21 Feb 2015 04:28:26 +0000 (04:28 +0000)]
[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
Davide Italiano [Sat, 21 Feb 2015 02:36:54 +0000 (02:36 +0000)]
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
Tim Northover [Sat, 21 Feb 2015 02:11:17 +0000 (02:11 +0000)]
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
David Majnemer [Sat, 21 Feb 2015 01:04:47 +0000 (01:04 +0000)]
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
Duncan P. N. Exon Smith [Sat, 21 Feb 2015 01:02:18 +0000 (01:02 +0000)]
AsmParser/Writer: Handle symbolic constants in DI 'flags:'
Parse (and write) symbolic constants in debug info `flags:` fields.
This prevents a readability (and CHECK-ability) regression with the new
debug info hierarchy.
Old (well, current) assembly, with pretty-printing:
!{!"...\\
0016387", ...} ; ... [public] [rvalue reference]
Flags field without this change:
!MDDerivedType(flags: 16387, ...)
Flags field with this change:
!MDDerivedType(flags: DIFlagPublic | DIFlagRValueReference, ...)
As discussed in the review thread, this isn't a final state. Most of
these flags correspond to `DW_AT_` symbolic constants, and we might
eventually want to support arbitrary attributes in some form. However,
as it stands now, some of the flags correspond to other concepts (like
`FlagStaticMember`); until things are refactored this is the simplest
way to move forward without regressing assembly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230111
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 21 Feb 2015 00:45:26 +0000 (00:45 +0000)]
IR: Add helper to split debug info flags bitfield
Split debug info 'flags' bitfield over a vector so the current flags can
be iterated over. This API (in combination with r230107) will be used
for assembly support for symbolic constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230108
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 21 Feb 2015 00:43:09 +0000 (00:43 +0000)]
IR: Add debug info flag string conversions
Add `DIDescriptor::getFlag(StringRef)` and
`DIDescriptor::getFlagString(unsigned)`. The latter only converts exact
matches; I'll add separate API for breaking the flags bitfield up into
parts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230107
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 21 Feb 2015 00:37:53 +0000 (00:37 +0000)]
IR: Move DebugInfo Flag* definitions to .def file, NFC
This prepares for adding string support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230105
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Sat, 21 Feb 2015 00:18:40 +0000 (00:18 +0000)]
AsmParser: Use StringRef for keyword comparisons, NFC
Leverage `StringRef` inside keyword comparison macros. There's no
reason to be so low-level here, and I'm about to add another
`startswith()` use, so let's make it easy to read.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230100
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 21 Feb 2015 00:13:15 +0000 (00:13 +0000)]
Set the datalayout in the gold plugin.
This fixes the gold tests after r230054.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230098
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Sat, 21 Feb 2015 00:09:09 +0000 (00:09 +0000)]
[PlaceSafepoints] Adjust enablement logic to default to off and be GC configurable per GC
Previously, this pass ran over every function in the Module if added to the pass order. With this change, it runs only over those with a GC attribute where the GC explicitly opts in. A GC can also choose which of entry safepoint polls, backedge safepoint polls, and call safepoints it wants. I hope to get these exposed as checks on the GCStrategy at some point, but for now, the checks are manual string comparisons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230097
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 20 Feb 2015 23:49:24 +0000 (23:49 +0000)]
AsmParser: Use do{}while(false) in macros, NFC
`do { ... } while (false)` is standard macro etiquette for forcing
instantiations into a single statement and requiring a `;` afterwards,
making statement-like macros easier to reason about (and harder to use
incorrectly).
I'm about to modify the macros in `LexIdentifier()`. I noticed that the
`KEYWORD` macro *does* follow the rule, so I thought I'd clean up the
other macros to match (otherwise might not be worth changing, since the
benefits of this pattern are fairly irrelevant here).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230095
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 20 Feb 2015 23:44:24 +0000 (23:44 +0000)]
Remove some unnecessary unreachables in favor of (sometimes implicit) assertions
Also simplify some else-after-return cases including some standard
algorithm convenience/use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230094
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Fri, 20 Feb 2015 23:43:14 +0000 (23:43 +0000)]
LiveRangeCalc: Don't start liveranges of PHI instruction at the block begin.
Summary:
Letting them begin at the PHI instruction slightly simplifies the code
but more importantly avoids breaking the assumption that live ranges
starting at the block begin are also live at the end of the predecessor
blocks. The MachineVerifier checks that but was apparently never run in
the few instances where liveranges are calculated for machine-SSA
functions.
Reviewers: qcolombet
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D7779
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230093
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 20 Feb 2015 23:32:03 +0000 (23:32 +0000)]
Hide a bunch of advanced testing options in default opt --help output
These are internal options. I need to go through, evaluate which are worth keeping and which not. Many of them should probably be renamed as well. Until I have time to do that, we can at least stop poluting the standard opt -help output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230088
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 20 Feb 2015 23:28:28 +0000 (23:28 +0000)]
Use short names for jumptable sections.
Also refactor code to remove some duplication.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230087
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 20 Feb 2015 23:21:21 +0000 (23:21 +0000)]
Revert "[llvm-pdbdump] Add some tests for llvm-pdbdump."
It is not correctly detecting the situations where the test is
unsupported. Reverting until we can figure it out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230085
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 20 Feb 2015 23:16:52 +0000 (23:16 +0000)]
[RewriteStatepointsForGC] Use DenseSet in place of std::set [NFC]
This should be the last cleanup on non-llvm preferred data structures. I left one use of std::set in an assertion; DenseSet didn't seem to have a tombstone for CallSite defined. That might be worth fixing, but wasn't worth it for a debug only use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230084
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 20 Feb 2015 23:05:57 +0000 (23:05 +0000)]
[llvm-pdbdump] Add some tests for llvm-pdbdump.
This adds only a very basic set of tests that dump a few
functions and object files.
Differential Revision: http://reviews.llvm.org/D7656
Reviewed By: David Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230083
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 20 Feb 2015 22:48:20 +0000 (22:48 +0000)]
[RewriteStatepointsForGC] Replace std::map with DenseMap
I'd done the work of extracting the typedef in a previous commit, but didn't actually change it. Hopefully this will make any subtle changes easier to isolate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230081
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 20 Feb 2015 22:39:41 +0000 (22:39 +0000)]
[RewriteStatepointsForGC] Cleanup - replace std::vector usage [NFC]
Migrate std::vector usage to a combination of SmallVector and ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230079
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Feb 2015 22:36:11 +0000 (22:36 +0000)]
Used the cached subtarget off of the MachineFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230078
91177308-0d34-0410-b5e6-
96231b3b80d8