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
Reid Kleckner [Fri, 20 Feb 2015 22:13:25 +0000 (22:13 +0000)]
X86: Remove pre-2010 dead code in mergeSPUpdatesDown
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230075
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 20 Feb 2015 22:13:03 +0000 (22:13 +0000)]
LowerScalarImmediateShift - Merged v16i8 and v32i8 shift lowering. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230074
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 20 Feb 2015 22:10:45 +0000 (22:10 +0000)]
R600/SI: Remove v_sub_f64 pseudo
The expansion code does the same thing. Since
the operands were not defined with the correct
types, this has the side effect of fixing operand
folding since the expanded pseudo would never use
SGPRs or inline immediates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230072
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 20 Feb 2015 22:10:41 +0000 (22:10 +0000)]
R600: Use new fmad node.
This enables a few useful combines that used to only
use fma.
Also since v_mad_f32 apparently does not support denormals,
disable the existing cases that are custom handled if they are
requested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230071
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 20 Feb 2015 22:10:33 +0000 (22:10 +0000)]
Add generic fmad DAG node.
This allows sharing of FMA forming combines to work
with instructions that have the same semantics as a separate
multiply and add.
This is expand by default, and only formed post legalization
so it shouldn't have much impact on targets that do not want it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230070
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 20 Feb 2015 22:05:18 +0000 (22:05 +0000)]
[RewriteStatepointsForGC] More style cleanup [NFC]
Use llvm_unreachable where appropriate, use SmallVector where easy to do so, introduce typedefs for planned type migrations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230068
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 20 Feb 2015 21:34:11 +0000 (21:34 +0000)]
[RewriteStatepointsForGC] Remove notion of SafepointBounds [NFC]
The notion of a range of inserted safepoint related code is no longer really applicable. This survived over from an earlier implementation. Just saving the inserted gc.statepoint and working from that is far clearer given the current code structure. Particularly when invokable statepoints get involved.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230063
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Fri, 20 Feb 2015 21:28:18 +0000 (21:28 +0000)]
Raising minimum required CMake version to 2.8.12.2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230062
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Feb 2015 20:56:39 +0000 (20:56 +0000)]
Grab the DataLayout off of the TargetMachine since that's where
it's stored.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230059
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 20 Feb 2015 20:49:25 +0000 (20:49 +0000)]
LoopRotate: When reconstructing loop simplify form don't split edges from indirectbrs.
Yet another chapter in the endless story. While this looks like we leave
the loop in a non-canonical state this replicates the logic in
LoopSimplify so it doesn't diverge from the canonical form in any way.
PR21968
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230058
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Fri, 20 Feb 2015 20:35:17 +0000 (20:35 +0000)]
IR: Change MDFile to directly store the filename/directory
In the old (well, current) schema, there are two types of file
references: untagged and tagged (the latter references the former).
!0 = !{!"filename", !"/directory"}
!1 = !{!"0x29", !1} ; DW_TAG_file_type [filename] [/directory]
The interface to `DIBuilder` universally takes the tagged version,
described by `DIFile`. However, most `file:` references actually use
the untagged version directly.
In the new hierarchy, I'm merging this into a single node: `MDFile`.
Originally I'd planned to keep the old schema unchanged until after I
moved the new hierarchy into place.
However, it turns out to be trivial to make `MDFile` match both nodes at
the same time.
- Anyone referencing !1 does so through `DIFile`, whose implementation
I need to gut anyway (as I do the rest of the `DIDescriptor`s).
- Anyone referencing !0 just references an `MDNode`, and expects a
node with two `MDString` operands.
This commit achieves that, and updates all the testcases for the parts
of the new hierarchy that used the two-node schema (I've replaced the
untagged nodes with `distinct !{}` to make the diff clear (otherwise the
metadata all gets renumbered); it might be worthwhile to come back and
delete those nodes and renumber the world, not sure).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230057
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 20 Feb 2015 20:30:47 +0000 (20:30 +0000)]
Introduce bitset metadata format and bitset lowering pass.
This patch introduces a new mechanism that allows IR modules to co-operatively
build pointer sets corresponding to addresses within a given set of
globals. One particular use case for this is to allow a C++ program to
efficiently verify (at each call site) that a vtable pointer is in the set
of valid vtable pointers for the class or its derived classes. One way of
doing this is for a toolchain component to build, for each class, a bit set
that maps to the memory region allocated for the vtables, such that each 1
bit in the bit set maps to a valid vtable for that class, and lay out the
vtables next to each other, to minimize the total size of the bit sets.
The patch introduces a metadata format for representing pointer sets, an
'@llvm.bitset.test' intrinsic and an LTO lowering pass that lays out the globals
and builds the bitsets, and documents the new feature.
Differential Revision: http://reviews.llvm.org/D7288
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230054
91177308-0d34-0410-b5e6-
96231b3b80d8
Jozef Kolek [Fri, 20 Feb 2015 20:26:52 +0000 (20:26 +0000)]
Reversed revision 229706. The reason is regression, which is caused by the
usage of instruction ADDU16 by CodeGen. For this instruction an improper
register is allocated, i.e. the register that is not from register set defined
for the instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230053
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 20 Feb 2015 19:58:48 +0000 (19:58 +0000)]
Verifier: Unused comdats might not have a corresponding GV
This fixes PR22646.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230051
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Feb 2015 19:54:07 +0000 (19:54 +0000)]
Fix an asan use-after-free bug introduced by the asm printer
changes to remove non-Function based subtargets out of the asm
printer. For module level emission we'll need to construct up
an MCSubtargetInfo so that we can encode instructions for
emission.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230050
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 20 Feb 2015 19:51:56 +0000 (19:51 +0000)]
[GC, RewriteStatepointsForGC] Style cleanup and bug fix
When doing style cleanup, I noticed a minor bug in this code. If we have a pointer that we think is unused after a statepoint and thus doesn't need relocation, we store a null pointer into the alloca we're about to promote. This helps turn a mistake in liveness analysis into an easily debuggable crash. It turned out this code had never been updated to handle invoke statepoints.
There's no test for this. Without a bug in liveness, it appears impossible to make this trigger in a way which is visible in the resulting IR. We might store the null, but when promoting the alloca, there will be no uses and thus nothing to test against. Suggestions on how to test are very welcome.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230047
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 20 Feb 2015 19:46:02 +0000 (19:46 +0000)]
Use unreachable instead of assert(false) to silence MSVC warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230045
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Fri, 20 Feb 2015 19:37:14 +0000 (19:37 +0000)]
[X86][FastIsel] Teach how to select float-half conversion intrinsics.
This patch teaches X86FastISel how to select intrinsic 'convert_from_fp16' and
intrinsic 'convert_to_fp16'.
If the target has F16C, we can select VCVTPS2PHrr for a float-half conversion,
and VCVTPH2PSrr for a half-float conversion.
Differential Revision: http://reviews.llvm.org/D7673
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230043
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 20 Feb 2015 19:26:04 +0000 (19:26 +0000)]
[GC] Style cleanup for RewriteStatepointForGC (1 of many) [NFC]
Starting to update variable naming and types to match LLVM style. This will be an incremental process to minimize the chance of breakage as I work. Step one, rename member variables to LLVM CamelCase and use llvm's ADT. Much more to come.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230042
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Fri, 20 Feb 2015 19:02:59 +0000 (19:02 +0000)]
Setting up CMake to default to Debug when no build type is specified.
Summary: Turns out if you don't set CMAKE_BUILD_TYPE the default is an empty string. This results in some of the behaviors of debug builds, but not all of them. For example ENABLE_ASSERTIONS is false.
Reviewers: rnk
Reviewed By: rnk
Subscribers: chapuni, llvm-commits
Differential Revision: http://reviews.llvm.org/D7360
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230041
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Fri, 20 Feb 2015 18:56:14 +0000 (18:56 +0000)]
Bugfix for 229954
Before calling Function::getGC to test for enablement, we need to make sure there's actually a GC at all via Function::hasGC. Otherwise, we'd crash on functions without a GC. Thankfully, this only mattered if you manually scheduled the pass, but still, oops. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230040
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Feb 2015 18:53:42 +0000 (18:53 +0000)]
Remove a use of the Subtarget in the darwin ppc asm printer.
EmitFunctionStubs is called from doFinalization and so can't
depend on the Subtarget existing. It's also irrelevant as
we know we're darwin since we're in the darwin asm printer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230039
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Feb 2015 18:44:17 +0000 (18:44 +0000)]
Get the function specific subtarget.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230038
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Feb 2015 18:44:15 +0000 (18:44 +0000)]
Get the cached subtarget off the MachineFunction rather than
inquiring for a new one from the TargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230037
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 20 Feb 2015 16:55:27 +0000 (16:55 +0000)]
canonicalize a v2f64 blendi of 2 registers
This canonicalization step saves us 3 pattern matching possibilities * 4 math ops
for scalar FP math that uses xmm regs. The backend can re-commute the operands
post-instruction-selection if that makes register allocation better.
The tests in llvm/test/CodeGen/X86/sse-scalar-fp-arith.ll cover this scenario already,
so there are no new tests with this patch.
Differential Revision: http://reviews.llvm.org/D7777
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230024
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 20 Feb 2015 16:35:42 +0000 (16:35 +0000)]
Put MSVC back into the dumb compiler's corner.
It fails to compile std::trivially_copyable for forward-declared enums.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230023
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 20 Feb 2015 16:19:28 +0000 (16:19 +0000)]
Base isPodLike on is_trivially_copyable for GCC 5 and MSVC
It would be nice to get rid of the version checks here, but that will
have to wait until libstdc++ is upgraded to 5.0 everywhere ...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230021
91177308-0d34-0410-b5e6-
96231b3b80d8
Kit Barton [Fri, 20 Feb 2015 15:54:58 +0000 (15:54 +0000)]
I incorrectly marked the VORC instruction as isCommutable when I added it.
This fix removes the VORC instruction definition from the isCommutable block.
Phabricator review: http://reviews.llvm.org/D7772
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230020
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Fri, 20 Feb 2015 15:28:35 +0000 (15:28 +0000)]
Generalize statepoint lowering to use ImmutableStatepoint. Move statepoint lowering into a separate function 'LowerStatepoint' which uses ImmutableStatepoint instead of a CallInst. Also related utility functions are changed to receive ImmutableCallSite.
Differential Revision: http://reviews.llvm.org/D7756
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230017
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 20 Feb 2015 15:11:55 +0000 (15:11 +0000)]
Constants.cpp: Only read 32 bits for float.
Otherwise we'll discard the wrong half of a uint64_t on big-endian systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230016
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 20 Feb 2015 14:24:49 +0000 (14:24 +0000)]
Constants.cpp: getElementAsAPFloat(): Don't handle constant value via host's float/double, just handle with APInt/APFloat.
x87 FPU didn't keep SNAN, but demoted to QNAN.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230013
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 20 Feb 2015 14:00:58 +0000 (14:00 +0000)]
RewriteStatepointsForGC: Move details into anonymous namespaces. NFC.
While there reduce the number of duplicated std::map lookups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230012
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 20 Feb 2015 13:16:05 +0000 (13:16 +0000)]
Make the static instance of None just const.
This way there shouldn't be any unused variable warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230010
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 20 Feb 2015 13:15:49 +0000 (13:15 +0000)]
Wrap recursive function only used in assert in #ifndef NDEBUG.
Avoids unused function warnings in Release builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230009
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 20 Feb 2015 10:47:28 +0000 (10:47 +0000)]
[x86] Switching the shuffle equivalence test to a variadic template was
the wrong answer. We also got initializer lists which are *way* cleaner
for this kind of thing. Let's use those and make this a normal, boring
functionn accepting ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230004
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Feb 2015 08:42:34 +0000 (08:42 +0000)]
Fix wording and grammar in Mips subtarget options.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230001
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Feb 2015 08:39:06 +0000 (08:39 +0000)]
Get the cached subtarget off the MachineFunction rather than
inquiring for a new one from the TargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230000
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Feb 2015 08:24:37 +0000 (08:24 +0000)]
Get the cached subtarget off the MachineFunction rather than
inquiring for a new one from the TargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229999
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Feb 2015 08:24:34 +0000 (08:24 +0000)]
Get the cached subtarget off the MachineFunction rather than
inquiring for a new one from the TargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229998
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Feb 2015 08:01:55 +0000 (08:01 +0000)]
Save the MachineFunction in startFunction so that we can use it for
lookups of the subtarget later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229996
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Feb 2015 08:01:52 +0000 (08:01 +0000)]
Use the cached subtarget from the MachineFunction rather than
doing a lookup on the TargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229995
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Feb 2015 07:32:59 +0000 (07:32 +0000)]
Make the TargetMachine::getSubtarget that takes a Function argument
take a reference to match the getSubtargetImpl that takes a Function
argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229994
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 20 Feb 2015 07:28:28 +0000 (07:28 +0000)]
Disallow implicit conversions from None to integer types
This fixes an error introduced in r228934 where None was converted to
an int instead of the int being converted to an Optional as intended.
We make that sort of mistake a compile error by changing NoneType into
a scoped enum.
Finally, provide a static NoneType called None to avoid forcing all
users to spell it NoneType::None.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229980
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 20 Feb 2015 07:17:40 +0000 (07:17 +0000)]
Fix build with gcc. This has a -Wsequence-point error on 'MII', which is a good point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229979
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Feb 2015 07:16:19 +0000 (07:16 +0000)]
Remove more uses of TargetMachine::getSubtargetImpl from the
AsmPrinter.
getSubtargetInfo now asserts that the MachineFunction exists.
Debug printing of register naming now uses the register info
from MCAsmInfo as that's unchanging.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229978
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 20 Feb 2015 07:16:17 +0000 (07:16 +0000)]
Fix build in release mode, -Wunused-variable on this lambda function used only in an assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229977
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 20 Feb 2015 07:14:02 +0000 (07:14 +0000)]
Fix build in release mode, four cases of -Wunused-variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229976
91177308-0d34-0410-b5e6-
96231b3b80d8