Commit Graph

101073 Commits

Author SHA1 Message Date
Benjamin Kramer 3ad5c96268 [C++11] Modernize the IR library a bit.
No functionality change.

llvm-svn: 203465
2014-03-10 15:03:06 +00:00
Daniel Sanders 059e4b158c [mips][fp64] Add an implicit def to MFHC1 claiming that it reads the lower 32-bits of 64-bit FPR
Summary:
This is a white lie to workaround a widespread bug in the -mfp64
implementation.

The problem is that none of the 32-bit fpu ops mention the fact that they
clobber the upper 32-bits of the 64-bit FPR. This allows MFHC1 to be
scheduled on the wrong side of most 32-bit FPU ops. Fixing that requires a
major overhaul of the FPU implementation which can't be done right now due to
time constraints.

MFHC1 is one of two affected instructions. These instructions are the only
FPU instructions that don't read or write the lower 32-bits. We therefore
pretend that it reads the bottom 32-bits to artificially create a dependency and
prevent the scheduler changing the behaviour of the code.
The other instruction is MTHC1 which will be fixed once I've have found a failing
test case for it. 

The testcase is test-suite/SingleSource/UnitTests/Vector/simple.c when
given TARGET_CFLAGS="-mips32r2 -mfp64 -mmsa".

Reviewers: jacksprat, matheusalmeida

Reviewed By: jacksprat

Differential Revision: http://llvm-reviews.chandlerc.com/D2966

llvm-svn: 203464
2014-03-10 15:01:57 +00:00
Aaron Ballman 37da7ae0b6 Removing llvm::distance and llvm::copy for iterator_range based on post-commit review feedback. Adding an explicit range-based constructor to SmallVector, which supersedes the llvm::copy functionality.
llvm-svn: 203460
2014-03-10 13:43:46 +00:00
Matheus Almeida 64459d296b [mips] Assembly parser must invoke the target streamer to handle .set reorder macro.
llvm-svn: 203459
2014-03-10 13:21:10 +00:00
Tim Northover 2a661f3f73 AArch64: fix LowerCONCAT_VECTORS for new CodeGen.
The function was making too many assumptions about its input:

1. The NEON_VDUP optimisation was far too aggressive, assuming (I
think) that the input would always be BUILD_VECTOR.

2. We were treating most unknown concats as legal (by returning Op
rather than SDValue()). I think only concats of pairs of vectors are
actually legal.

http://llvm.org/PR19094

llvm-svn: 203450
2014-03-10 09:34:07 +00:00
Chandler Carruth 6c25ca87a0 [LCG] Make this call graph a fully regular type by giving it assignment
as well. I don't see any particular need but it imposes no cost to
support it and it makes the API cleaner.

llvm-svn: 203448
2014-03-10 08:08:59 +00:00
Chandler Carruth fdb30c6e0e [LCG] Make the iterator move constructable (and thus movable in general)
now that there is essentially no cost to doing so. Yay C++11.

llvm-svn: 203447
2014-03-10 08:08:47 +00:00
Craig Topper 24e685fdb0 [C++11] Remove 'virtual' keyword from methods marked with 'override' keyword.
llvm-svn: 203444
2014-03-10 05:29:18 +00:00
Craig Topper 6ff5aa7c87 [C++11] Remove 'virtual' keyword from methods marked with 'override' keyword.
llvm-svn: 203442
2014-03-10 03:53:12 +00:00
Chandler Carruth e42bafece1 [AArch64] Fix a use of uninitialized memory introduced in r203125,
and caught by the MSan bootstrap build bot. This should hopefully get
the bot green at long last.

llvm-svn: 203441
2014-03-10 03:52:47 +00:00
Craig Topper d25ff6f917 De-virtualize a method since it doesn't override anything and isn't overridden itself.
llvm-svn: 203440
2014-03-10 03:22:59 +00:00
Craig Topper ca7e3e5c4b [C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203439
2014-03-10 03:19:03 +00:00
Chandler Carruth 4ede164055 [LCG] One more formatting fix that I failed to get into the prior
commit. Sorry for the churn, just trying to keep it out of any
functionality changed.

llvm-svn: 203438
2014-03-10 02:50:21 +00:00
Chandler Carruth aee3ca6cfd [TTI] There is actually no realistic way to pop TTI implementations off
the stack of the analysis group because they are all immutable passes.
This is made clear by Craig's recent work to use override
systematically -- we weren't overriding anything for 'finalizePass'
because there is no such thing.

This is kind of a lame restriction on the API -- we can no longer push
and pop things, we just set up the stack and run. However, I'm not
invested in building some better solution on top of the existing
(terrifying) immutable pass and legacy pass manager.

llvm-svn: 203437
2014-03-10 02:45:14 +00:00
NAKAMURA Takumi 8346167fab ADT/PointerIntPairTest.cpp: Appease msc17.
- Use constructor instead of initializer list.
  - Disable ManyUnusedBits for now.

llvm-svn: 203436
2014-03-10 02:33:17 +00:00
Chandler Carruth e9b50617b8 [LCG] Ran clang-format over this too and it pointed out some fixes.
llvm-svn: 203435
2014-03-10 02:14:14 +00:00
Chandler Carruth 5ae74a6af2 [PM] While I'm here, fix a few other clang-format issues. Pulls some
lines under 80-columns, etc.

llvm-svn: 203434
2014-03-10 02:12:14 +00:00
Craig Topper 6bc27bf359 [C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203433
2014-03-10 02:09:33 +00:00
Chandler Carruth 245b7fd3f2 [PM] Cleanup formatting and namespace commenting. Mostly done with
clang-format, but with some modifications by me where it got things
wrong or got confused.

llvm-svn: 203432
2014-03-10 01:42:03 +00:00
Chandler Carruth ca7fbae3f6 [PM] As Dave noticed in review, I had erroneously copied the move
constructors from the classes which only have a single reference member
to many other places. This resulted in them copying their single member
instead of moving. =/ Fix this.

There's really not a useful test to add sadly because these move
constructors are only called when something deep inside some standard
library implementation *needs* to move them. Many of the types aren't
even user-impacting types. Or, the objects are copyable anyways and so
the result was merely a performance problem rather than a correctness
problem.

Anyways, thanks for the review. And this is a great example of why
I wish I colud have the compiler write these for me.

llvm-svn: 203431
2014-03-10 01:32:25 +00:00
David Majnemer 596587f6d0 MC: Appease the buildbots
This is fallout from r203429.

llvm-svn: 203430
2014-03-10 01:04:18 +00:00
David Majnemer e500ec1f3a MC: Cleanup MCSectionMachO::ParseSectionSpecifier
Split by comma once instead of multiple times.  Moving this upfront
makes the rest of the code considerably simpler.

No functional change.

llvm-svn: 203429
2014-03-10 00:55:07 +00:00
Chandler Carruth 97d7be526b [PM] Add a comment I missed and add the special members to one more
class that might (at some point) need them.

llvm-svn: 203428
2014-03-10 00:54:01 +00:00
Chandler Carruth 223a1131d8 [PM] Comment on all of the totally pointless definitions of special
members as being te workaround MSVC.

llvm-svn: 203427
2014-03-10 00:50:56 +00:00
Chandler Carruth bc0dc6602f [PM] I have been educated by several folks that MSVC will never
synthesize a move constructor. Thus, for any types where move semantics
are important (yea, that's essentially every type...) you must
explicitly define the special members. Do so systematically throughout
the pass manager as the core of the design relies heavily on move
semantics.

This will hopefully fix the build with MSVC 2013. We still don't know
why MSVC 2012 accepted this code, but it almost certainly wasn't doing
the right thing.

I've also added explicit to a few single-argument constructors spotted
in passing.

llvm-svn: 203426
2014-03-10 00:35:47 +00:00
Venkatraman Govindaraju f703132b09 [Sparc] Add support for decoding 'swap' instruction.
llvm-svn: 203424
2014-03-09 23:32:07 +00:00
Bob Wilson a2790b106d Fix inconsistent whitespace.
llvm-svn: 203423
2014-03-09 23:17:28 +00:00
Ed Maste 644aef8f84 Work around FreeBSD rtld rpath $ORIGIN limitation
FreeBSD's rtld requires the DF_ORIGIN flag set in order to process
$ORIGIN in rpath.

FreeBSD bug http://bugs.freebsd.org/187114

llvm-svn: 203419
2014-03-09 18:48:45 +00:00
Craig Topper 39012ccee9 [C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203418
2014-03-09 18:03:14 +00:00
Benjamin Kramer 24555e15ef StackColoring: Use range-based for loops.
No functionality change.

llvm-svn: 203415
2014-03-09 15:44:45 +00:00
Benjamin Kramer 2abfd6c734 MachineModuleInfo: Turn nested std::pairs into a proper struct.
llvm-svn: 203414
2014-03-09 15:44:39 +00:00
Benjamin Kramer 79da941f3a SimplifyCFG: Simplify the weight scaling algorithm.
No change in functionality.

llvm-svn: 203413
2014-03-09 14:42:55 +00:00
Chandler Carruth b9e2f8c479 [LCG] Simplify a bunch of the LCG code with range for loops and auto.
Still more work to be done here to leverage C++11, but this clears out
the glaring issues.

llvm-svn: 203395
2014-03-09 12:20:34 +00:00
Chandler Carruth 4eeb668961 [C++11] Add range views for various parts of a Module.
llvm-svn: 203394
2014-03-09 12:20:30 +00:00
Ahmed Charles 71ce89c1c0 Change documentation based on feedback from Chandler.
llvm-svn: 203393
2014-03-09 12:12:23 +00:00
Chandler Carruth 3056818033 [C++11] Now that we have C++11 and I've replaced the use of this
horrible smart pointer by std::unique_ptr and strict move semantics, rip
this out.

llvm-svn: 203392
2014-03-09 11:51:11 +00:00
Chandler Carruth c3f3da3d21 [PM] Switch new pass manager from polymorphic_ptr to unique_ptr now that
it is available. Also make the move semantics sufficiently correct to
tolerate move-only passes, as the PassManagers *are* move-only passes.

llvm-svn: 203391
2014-03-09 11:49:53 +00:00
Ahmed Charles f9d26f1b78 [C++11] Add llvm::make_unique, according to N3656.
llvm-svn: 203387
2014-03-09 11:20:17 +00:00
NAKAMURA Takumi 1783e1e984 Revert r203230, "CodeGenPrep: sink extends of illegal types into use block."
It choked i686 stage2.

llvm-svn: 203386
2014-03-09 11:01:07 +00:00
Craig Topper f5e3b0b98c De-virtualize some methods since they don't override anything.
llvm-svn: 203379
2014-03-09 07:58:15 +00:00
Craig Topper 2d9361e325 [C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203378
2014-03-09 07:44:38 +00:00
David Majnemer c4ab61cb2f IR: Change inalloca's grammar a bit
The grammar for LLVM IR is not well specified in any document but seems
to obey the following rules:

 - Attributes which have parenthesized arguments are never preceded by
   commas.  This form of attribute is the only one which ever has
   optional arguments.  However, not all of these attributes support
   optional arguments: 'thread_local' supports an optional argument but
   'addrspace' does not.  Interestingly, 'addrspace' is documented as
   being a "qualifier".  What constitutes a qualifier?  I cannot find a
   definition.

 - Some attributes use a space between the keyword and the value.
   Examples of this form are 'align' and 'section'.  These are always
   preceded by a comma.

 - Otherwise, the attribute has no argument.  These attributes do not
   have a preceding comma.

Sometimes an attribute goes before the instruction, between the
instruction and it's type, or after it's type.  'atomicrmw' has
'volatile' between the instruction and the type while 'call' has 'tail'
preceding the instruction.

With all this in mind, it seems most consistent for 'inalloca' on an
'inalloca' instruction to occur before between the instruction and the
type.  Unlike the current formulation, there would be no preceding
comma.  The combination 'alloca inalloca' doesn't look particularly
appetizing, perhaps a better spelling of 'inalloca' is down the road.

llvm-svn: 203376
2014-03-09 06:41:58 +00:00
David Blaikie 259a5a649f Revert "Clean up SmallString a bit"
This reverts commit r203374.

Ambiguities in assign... oh well. I'm just going to revert this and
probably not try to recommit it as it's not terribly important.

llvm-svn: 203375
2014-03-09 06:22:58 +00:00
David Blaikie d028adf7bc Clean up SmallString a bit
Move a common utility (assign(iter, iter)) into SmallVector (some of the
others could be moved there too, but this one seemed particularly
generic) and replace repetitions overrides with using directives.

And simplify SmallVector::assign(num, element) while I'm here rather
than thrashing these files (that cause everyone to rebuild) again.

llvm-svn: 203374
2014-03-09 06:17:01 +00:00
Ahmed Charles 821b66669c [C++11] Fix break due to MSVC bug.
MSVC (2012, 2013, 2013 Nov CTP) fail on the following code:

int main() {
  int arr[] = {1, 2};
  for (int i : arr)
    do {} while (0);
}

The fix is to put {} around the for loop. I've reported this to the MSVC
team.

llvm-svn: 203371
2014-03-09 04:57:09 +00:00
Ahmed Charles 5d461ede5b Fix build break.
llvm-svn: 203366
2014-03-09 03:50:36 +00:00
Chandler Carruth cdf4788401 [C++11] Add range based accessors for the Use-Def chain of a Value.
This requires a number of steps.
1) Move value_use_iterator into the Value class as an implementation
   detail
2) Change it to actually be a *Use* iterator rather than a *User*
   iterator.
3) Add an adaptor which is a User iterator that always looks through the
   Use to the User.
4) Wrap these in Value::use_iterator and Value::user_iterator typedefs.
5) Add the range adaptors as Value::uses() and Value::users().
6) Update *all* of the callers to correctly distinguish between whether
   they wanted a use_iterator (and to explicitly dig out the User when
   needed), or a user_iterator which makes the Use itself totally
   opaque.

Because #6 requires churning essentially everything that walked the
Use-Def chains, I went ahead and added all of the range adaptors and
switched them to range-based loops where appropriate. Also because the
renaming requires at least churning every line of code, it didn't make
any sense to split these up into multiple commits -- all of which would
touch all of the same lies of code.

The result is still not quite optimal. The Value::use_iterator is a nice
regular iterator, but Value::user_iterator is an iterator over User*s
rather than over the User objects themselves. As a consequence, it fits
a bit awkwardly into the range-based world and it has the weird
extra-dereferencing 'operator->' that so many of our iterators have.
I think this could be fixed by providing something which transforms
a range of T&s into a range of T*s, but that *can* be separated into
another patch, and it isn't yet 100% clear whether this is the right
move.

However, this change gets us most of the benefit and cleans up
a substantial amount of code around Use and User. =]

llvm-svn: 203364
2014-03-09 03:16:01 +00:00
Adam Nemet 4203039760 Update comment from r203315 based on review
llvm-svn: 203361
2014-03-08 21:51:55 +00:00
Aaron Ballman 7fad360fe3 Adding some includes to appease build bots. Amends r203354
llvm-svn: 203356
2014-03-08 20:15:31 +00:00
Aaron Ballman 1b91204e3d Adding range-based STL-like helper APIs. llvm::distance() is the range version of std::distance. llvm::copy is the range version of std::copy.
llvm-svn: 203354
2014-03-08 20:11:24 +00:00
Lang Hames 951b235be2 Make createObjectImage and createObjectImageFromFile static methods on the
relevant subclasses of RuntimeDyldImpl. This allows construction of
RuntimeDyldImpl instances to be deferred until after the target architecture is
known.

llvm-svn: 203352
2014-03-08 18:45:12 +00:00
Duncan P. N. Exon Smith 429d2608f9 Change else if => if after return, after r203265
llvm-svn: 203347
2014-03-08 15:15:42 +00:00
Ahmed Charles 007bf9a541 Fix 80 cols.
llvm-svn: 203346
2014-03-08 12:51:31 +00:00
Craig Topper e56917c0ca [C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203345
2014-03-08 08:27:28 +00:00
Craig Topper b51ff603ea [C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203344
2014-03-08 07:51:20 +00:00
Adam Nemet 5f9eb0af72 [bugpoint] Don't ignore arg in -compile-commad="tool arg"
Args is an output parameter of the function lexCommand but the reference
operator was missed.

llvm-svn: 203343
2014-03-08 07:48:19 +00:00
Craig Topper 59be68f05f [C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203342
2014-03-08 07:14:16 +00:00
Craig Topper 12f0ca454b De-virtualize a method since it doesn't override anything (yay 'override' keyword) and its class is in an anonymous namespace.
llvm-svn: 203341
2014-03-08 07:07:08 +00:00
Craig Topper 34a61bc97a [C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203340
2014-03-08 07:02:02 +00:00
Craig Topper 7b883b314c [C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203339
2014-03-08 06:31:39 +00:00
David Blaikie 078278fe3a DebugInfo: further improvements to test following up on r203329
llvm-svn: 203337
2014-03-08 02:45:53 +00:00
David Blaikie f528f054d0 DebugInfo: Fix test fallout from r203323
Will fix this harder in a moment.

llvm-svn: 203329
2014-03-08 01:32:51 +00:00
David Blaikie 26ab6c6dd5 DebugInfo: Use DW_FORM_data4 for DW_AT_high_pc in DW_TAG_lexical_blocks
Suggested by Adrian Prantl in code review for r203187

llvm-svn: 203323
2014-03-08 00:58:20 +00:00
Eric Christopher 4f17ee09f9 Add support for hashing location information for CU level hashes.
Add a testcase based on sret.cpp where we can now hash the entire
compile unit.

llvm-svn: 203319
2014-03-08 00:29:41 +00:00
Adam Nemet 7f928f14f4 [DAGCombiner] Distribute TRUNC through AND in rotation amount
This is already done for shifts.  Allow it for rotations as well. E.g.:

   (rotl:i32 x, (trunc (and y, 31))) -> (rotl:i32 x, (and (trunc y), 31))

Use the newly factored-out distributeTruncateThroughAnd.

With this patch and some X86.td tweaks we should be able to remove redundant
masking of the rotation amount like in the example above.  HW implicitly
performs this masking.

The testcase will be added as part of the X86 patch.

llvm-svn: 203316
2014-03-07 23:56:30 +00:00
Adam Nemet 5117f5dffc [DAGCombiner] Recognize another rotation idiom
This is the new idiom:

  x<<(y&31) | x>>((0-y)&31)

which is recognized as:

  x ROTL (y&31)

The change refines matchRotateSub.  In
Neg & (OpSize - 1) == (OpSize - Pos) & (OpSize - 1), if Pos is
Pos' & (OpSize - 1) we can just use Pos' instead of Pos.

llvm-svn: 203315
2014-03-07 23:56:28 +00:00
Adam Nemet c6553a8354 [DAGCombiner] Slightly improve readability of matchRotateSub
Slightly change the wording in the function comment. Originally, it can be
misunderstood as we turned the input into two subsequent rotates.

Better connect the comment which talks about Mask and the code which used
LoBits.  Renamed variable to MaskLoBits.

llvm-svn: 203314
2014-03-07 23:56:24 +00:00
Arnold Schwaighofer d33e942958 ISel: Make VSELECT selection terminate in cases where the condition type has to
be split and the result type widened.

When the condition of a vselect has to be split it makes no sense widening the
vselect and thereby widening the condition. We end up in an endless loop of
widening (vselect result type) and splitting (condition mask type) doing this.
Instead, split both the condition and the vselect and widen the result.

I ran this over the test suite with i686 and mattr=+sse and saw no regressions.

Fixes PR18036.

llvm-svn: 203311
2014-03-07 23:25:55 +00:00
Adrian Prantl 887e70786a Remove unnecessary test for Darwin and update testcase to be a little less
horrible/fragile.
rdar://problem/16264854

llvm-svn: 203309
2014-03-07 23:07:21 +00:00
Eric Christopher 1d6d1c88bd Add a virtual destructor to quiet a warning.
llvm-svn: 203307
2014-03-07 22:53:36 +00:00
Owen Anderson 8c1f17bb98 Range-ify some for loops.
llvm-svn: 203306
2014-03-07 22:48:22 +00:00
Eric Christopher 6fbb7bbcc6 Actually add the header file.
llvm-svn: 203305
2014-03-07 22:43:09 +00:00
Eric Christopher 29e874dd2e Two part patch:
First: refactor out the emission of entries into the .debug_loc section
into its own routine.

Second: add a new class ByteStreamer that can be used to either emit
using an AsmPrinter or hash using DIEHash the series of bytes that
would be emitted. Use this in all of the location emission routines
for the .debug_loc section.

No functional change intended outside of a few additional comments
in verbose assembly.

llvm-svn: 203304
2014-03-07 22:40:37 +00:00
Eric Christopher 5c38b6598a Add include guards and make public a few routines that add values
to the hash.

llvm-svn: 203303
2014-03-07 22:40:30 +00:00
Eli Bendersky ab9da5129a Remove unused method declaration
llvm-svn: 203301
2014-03-07 22:19:10 +00:00
Adrian Prantl 5b573a0797 Revert "Remove unnecessary check for Darwin. rdar://problem/16264854"
This breaks linux buildbots. Go figure.

llvm-svn: 203300
2014-03-07 22:18:23 +00:00
Sasa Stankovic 1e50b46bf9 Moved test file from test/MC/Mips to test/CodeGen/Mips.
llvm-svn: 203298
2014-03-07 22:08:46 +00:00
Adrian Prantl 319ef2edcc Remove unnecessary check for Darwin. rdar://problem/16264854
llvm-svn: 203297
2014-03-07 22:04:42 +00:00
David Blaikie 555e79a304 DebugInfo: Use DW_FORM_data4 for DW_AT_high_pc in inlined functions
Suggested by Adrian Prantl in code review for r203187.

llvm-svn: 203296
2014-03-07 22:00:56 +00:00
David Blaikie 3e4ff7a92a DebugInfo: Update test to cover linux (with a FIXME...) too
llvm-svn: 203295
2014-03-07 22:00:49 +00:00
Benjamin Kramer adf1ea8227 [C++11] Revert uses of lambdas with array_pod_sort.
Looks like GCC implements the lambda->function pointer conversion differently.

llvm-svn: 203294
2014-03-07 21:52:38 +00:00
Benjamin Kramer b0f74b24fa [C++11] Convert sort predicates into lambdas.
No functionality change.

llvm-svn: 203288
2014-03-07 21:35:39 +00:00
Eric Christopher 526847fe20 Actually include the ArrayRef header rather than rely on the forward
declaration.

llvm-svn: 203287
2014-03-07 21:30:49 +00:00
Eric Christopher 5c30320c5f Fix up formatting.
llvm-svn: 203286
2014-03-07 21:27:42 +00:00
Eli Bendersky 4ccce1b728 Fix EXPECT_* to not produce a compile warning.
EXPECT_TRUE/FALSE is also more idiomatic for booleans than EXPECT_EQ

llvm-svn: 203284
2014-03-07 21:04:24 +00:00
Tom Stellard e28859f8fa R600/SI: Using SGPRs is illegal for instructions that read carry-out from VCC
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 203281
2014-03-07 20:12:39 +00:00
Tom Stellard 1c8788ef5a R600/SI: Custom lower i1 stores
These are sometimes created by the shrink to boolean optimization in the
globalopt pass.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
llvm-svn: 203280
2014-03-07 20:12:33 +00:00
Benjamin Kramer 571e2fecf8 [C++11] DwarfDebug: Turn single-use functors into lambdas.
No functionality change.

llvm-svn: 203276
2014-03-07 19:41:22 +00:00
Jordan Rose 05f44b4d1c [ADT] Update PointerIntPair to handle pointer types with more than 31 bits free.
Previously, the assertions in PointerIntPair would try to calculate the value
(1 << NumLowBitsAvailable); the inferred type here is 'int', so if there were
more than 31 bits available we'd get a shift overflow.

Also, add a rudimentary unit test file for PointerIntPair.

llvm-svn: 203273
2014-03-07 19:19:56 +00:00
Michael Gottesman 700a991f0d [docs] Teach CMake docs build how to generate Qt Creator help/documentation files.
Patch by Konrad Kleine.

Differential Revision: http://llvm-reviews.chandlerc.com/D2967

llvm-svn: 203272
2014-03-07 19:19:28 +00:00
Benjamin Kramer 15596c7b00 [C++11] DwarfDebug: Use range-based for loops.
It has a lot of them with complex types. C++11 really shines here.

llvm-svn: 203270
2014-03-07 19:09:39 +00:00
Rafael Espindola 24a542fd5c Don't avoid cfi instructions on the bg/p.
The integrated assembler now works for ppc. Since this was the last use of the
bg/p predicate and Hal says that it is now dead, drop the predicate too.

llvm-svn: 203269
2014-03-07 19:04:12 +00:00
Ted Kremenek d9e9c72732 Remove dead 'break' (dominated by 'return').
llvm-svn: 203267
2014-03-07 18:54:08 +00:00
Ted Kremenek 0b01471694 Remove dead 'return'.
llvm-svn: 203265
2014-03-07 18:51:16 +00:00
David Majnemer cd481d3845 MC: Use MachO::SectionType for MCSectionMachO::getType's return type
This is a straightfoward replacement, it makes debugging a little
easier.

This has no functional impact.

llvm-svn: 203264
2014-03-07 18:49:54 +00:00
David Blaikie 4bd13b7515 DebugInfo: Refactor high_pc/low_pc construction into reusable function
For incoming improvements to inlined functions and lexical blocks
suggested by Adrian Prantl in review of r203187.

llvm-svn: 203263
2014-03-07 18:49:45 +00:00
Nico Weber ad15692061 "Mac OS/X" -> "Mac OS X" spelling fixes for llvm.
Patch from Sean McBride <sean@rogue-research.com>!

llvm-svn: 203258
2014-03-07 18:08:54 +00:00
Duncan P. N. Exon Smith fdbb44a59e C++11: Remove const from in auto guidelines
Using const is orthogonal to guidelines on using auto& and auto*.

llvm-svn: 203257
2014-03-07 18:06:15 +00:00
David Blaikie d723f5186e DebugInfo: Restrict DW_AT_high_pc encoding as data4 offset to DWARF 4 as per spec
Code review feedback to r203187 from Oliver Stannard. Thanks!

llvm-svn: 203256
2014-03-07 18:04:24 +00:00
Duncan P. N. Exon Smith 6b3d6a4fe9 C++11: Copy pointers with const auto *
llvm-svn: 203254
2014-03-07 17:23:29 +00:00
Duncan P. N. Exon Smith 29db0eb855 ARM: Make .unreq directives case-insensitive
Be case-insensitive when processing .unreq directives.

Patch by Lin Zuojian!

llvm-svn: 203251
2014-03-07 16:16:52 +00:00
Benjamin Kramer bcc77b04bb [C++11] Now that the users are gone, rip out the duplicated traits from type_traits.h
Simplify the remaining ones a bit.

llvm-svn: 203249
2014-03-07 15:54:23 +00:00
Dmitri Gribenko 376bf57648 Add missing std:: qualifiers
llvm-svn: 203246
2014-03-07 14:55:30 +00:00
Benjamin Kramer 79a96dfce0 Make header standalone for libstdc++.
llvm-svn: 203243
2014-03-07 14:43:48 +00:00
Benjamin Kramer f04ddd01c9 [C++11] Replace LLVM-style type traits with C++11 standard ones.
No functionality change.

llvm-svn: 203242
2014-03-07 14:42:25 +00:00
Richard Sandiford 95bc5f92ee [SystemZ] Move sign_extend optimization to PerformDAGCombine
The target was marking SIGN_EXTEND as Custom because it wanted to optimize
certain sign-extended shifts.  In all other respects the extension is Legal,
so it'd be better to do the optimization in PerformDAGCombine instead.

No functional change intended.

llvm-svn: 203234
2014-03-07 11:34:35 +00:00
Tim Northover ad3d81d320 CodeGenPrep: sink extends of illegal types into use block.
This helps the instruction selector to lower an i64 * i64 -> i128
multiplication into a single instruction on targets which support it.

Patch by Manuel Jacob.

llvm-svn: 203230
2014-03-07 11:04:30 +00:00
Tim Northover fad2761ca0 InstCombine: form shuffles from wider range of insert/extractelements
Sequences of insertelement/extractelements are sometimes used to build
vectorsr; this code tries to put them back together into shuffles, but
could only produce a completely uniform shuffle types (<N x T> from two
<N x T> sources).

This should allow shuffles with different numbers of elements on the
input and output sides as well.

llvm-svn: 203229
2014-03-07 10:24:44 +00:00
Ahmed Charles df17c83fa8 Change MCDisassembler::setSymbolizer to take unique_ptr by value.
This changes the interface to be more explicit that ownership is being
transferred.

llvm-svn: 203223
2014-03-07 09:38:02 +00:00
Craig Topper c536a5dba0 Remove unused method.
llvm-svn: 203221
2014-03-07 09:26:53 +00:00
Craig Topper 4584cd54e3 [C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203220
2014-03-07 09:26:03 +00:00
Alexey Volkov 1051f04a8d Enable FeatureFastUAMem for Silvermont processor
Differential Revision: http://llvm-reviews.chandlerc.com/D2982

llvm-svn: 203218
2014-03-07 09:03:49 +00:00
Alexey Volkov bb2f047346 Test commit
Removed whitespace

llvm-svn: 203216
2014-03-07 08:28:44 +00:00
David Majnemer 7b58305ff6 MC: Remove superfluous section attribute flag definitions
Summary:
llvm/MC/MCSectionMachO.h and llvm/Support/MachO.h both had the same
definitions for the section flags.  Instead, grab the definitions out of
support.

No functionality change.

Reviewers: grosbach, Bigcheese, rafael

Reviewed By: rafael

CC: llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2998

llvm-svn: 203211
2014-03-07 07:36:05 +00:00
Ahmed Charles e3176267c2 [Typo] Fix sentence in CMake documentation.
llvm-svn: 203206
2014-03-07 06:24:30 +00:00
Rafael Espindola b1f25f1b93 Replace PROLOG_LABEL with a new CFI_INSTRUCTION.
The old system was fairly convoluted:
* A temporary label was created.
* A single PROLOG_LABEL was created with it.
* A few MCCFIInstructions were created with the same label.

The semantics were that the cfi instructions were mapped to the PROLOG_LABEL
via the temporary label. The output position was that of the PROLOG_LABEL.
The temporary label itself was used only for doing the mapping.

The new CFI_INSTRUCTION has a 1:1 mapping to MCCFIInstructions and points to
one by holding an index into the CFI instructions of this function.

I did consider removing MMI.getFrameInstructions completelly and having
CFI_INSTRUCTION own a MCCFIInstruction, but MCCFIInstructions have non
trivial constructors and destructors and are somewhat big, so the this setup
is probably better.

The net result is that we don't create temporary labels that are never used.

llvm-svn: 203204
2014-03-07 06:08:31 +00:00
Rafael Espindola c994c6a35b clang-format a bit of code to make the next patch easier to read.
llvm-svn: 203203
2014-03-07 05:32:03 +00:00
Rafael Espindola 0233bf19fd Simplify. No functionality change.
llvm-svn: 203202
2014-03-07 04:58:32 +00:00
Rafael Espindola afeb01c0a7 Simplify. No functionality change.
llvm-svn: 203199
2014-03-07 04:45:03 +00:00
Karthik Bhat b67688a87c Allow constant folding of round function whenever feasible
llvm-svn: 203198
2014-03-07 04:36:21 +00:00
Rafael Espindola 84c76ae6c7 Add missing "[unnamed_addr]" to LangRef.rst#functions.
Patch by Manuel Jacob.

llvm-svn: 203197
2014-03-07 04:28:28 +00:00
David Blaikie 479323a62b DebugInfo: Limit r203187 to non-darwin as lldb can't handle this yet
llvm-svn: 203192
2014-03-07 02:19:41 +00:00
Eric Christopher 698a8abb9a Move some dwarf emission routines to AsmPrinterDwarf.cpp.
llvm-svn: 203191
2014-03-07 01:44:14 +00:00
Eric Christopher dcb96e166b 80-column fixups.
llvm-svn: 203190
2014-03-07 01:44:12 +00:00
David Blaikie 48b1bdcf28 DebugInfo: Emit DW_TAG_subprogram's DW_AT_high_pc as an offset from the low_pc
This removes a relocation from each subprogram, reducing link times,
etc.

llvm-svn: 203187
2014-03-07 01:30:55 +00:00
David Blaikie f5040a64bb DebugInfo: Refactor test to not rely on fixed DIE offsets
llvm-svn: 203186
2014-03-07 01:19:31 +00:00
David Blaikie b9a0265cc1 DebugInfo: Improve test to not depend on the specific naming of temporary symbols
llvm-svn: 203184
2014-03-07 00:23:38 +00:00
Owen Anderson 270960f25b Add iterator_range support for MachineInstr's operand and memoperand iterators.
llvm-svn: 203181
2014-03-07 00:08:57 +00:00
Saleem Abdulrasool 5715e522ac Reapply "MC: simplify object file selection for Windows"
That was overly aggressive in assuming that we could always assume COFF.  Some
of the tests assume that they will get ELF rather than COFF even on Windows
where the default is COFF.

llvm-svn: 203176
2014-03-06 23:02:15 +00:00
Rafael Espindola 3b30cb41a9 Remove shouldEmitUsedDirectiveFor.
Clang now uses llvm.compiler.used for these cases.

llvm-svn: 203174
2014-03-06 22:47:08 +00:00
Rafael Espindola 123256a4aa Convert test to FileCheck.
llvm-svn: 203173
2014-03-06 22:21:43 +00:00
Ted Kremenek 297febee57 Remove unreachable 'return true' always dominated by 'return Error' or 'return false'.
llvm-svn: 203171
2014-03-06 22:13:17 +00:00
Argyrios Kyrtzidis 4147978cc5 [Support/LockFileManager] Re-apply r203137 and r203138 but use symbolic links only on unix.
Reid Kleckner pointed out that we can't use symbolic links on Windows.

llvm-svn: 203162
2014-03-06 20:53:58 +00:00
Saleem Abdulrasool 35476334e9 Support: split object format out of environment
This is a preliminary setup change to support a renaming of Windows target
triples.  Split the object file format information out of the environment into a
separate entity.  Unfortunately, file format was previously treated as an
environment with an unknown OS.  This is most obvious in the ARM subtarget where
the handling for macho on an arbitrary platform switches to AAPCS rather than
APCS (as per Apple's needs).

llvm-svn: 203160
2014-03-06 20:47:11 +00:00
Saleem Abdulrasool 0b5569972f MC: simplify object file selection for Windows
Windows always uses COFF unless Windows ELF is in use.  Rather than checking if
Windows, MinGW, or Cygwin is being targeted, just check if the target OS is
windows and that it is not an ELF environment.

llvm-svn: 203159
2014-03-06 20:47:03 +00:00
Andrea Di Biagio 6292a140ee [X86] Teach the DAGCombiner how to fold a OR of two shufflevector nodes.
This patch teaches the DAGCombiner how to fold a binary OR between two
shufflevector into a single shuffle vector when possible.

The rules are:
  1. fold (or (shuf A, V_0, MA), (shuf B, V_0, MB)) -> (shuf A, B, Mask1)
  2. fold (or (shuf A, V_0, MA), (shuf B, V_0, MB)) -> (shuf B, A, Mask2)

The DAGCombiner can take advantage of the fact that OR is commutative and
compute two possible shuffle masks (Mask1 and Mask2) for the resulting
shuffle node.

Before folding a dag according to either rule 1 or 2, DAGCombiner verifies
that the resulting shuffle mask is legal for the target.
DAGCombiner would firstly try to fold according to 1.; If not possible
then it will try to fold according to 2.
If both Mask1 and Mask2 are illegal then we conservatively don't fold
the OR instruction.

llvm-svn: 203156
2014-03-06 20:19:52 +00:00
Rafael Espindola 39a0965a3c Fix warning about mismatched signs in comparison.
llvm-svn: 203155
2014-03-06 20:16:24 +00:00
Rafael Espindola 1194e69fe6 Fix the printing of n_type.
Despite the name, n_type contains the type of the symbol, but also if it is
extern or private extern.

llvm-svn: 203154
2014-03-06 20:13:41 +00:00
Rafael Espindola c68b0f7797 Use the existing N_STAB from the MachO namespace.
llvm-svn: 203152
2014-03-06 19:58:56 +00:00
Eric Christopher eeb5195d3a Constify a few things with DotDebugLocEntry.
llvm-svn: 203150
2014-03-06 19:51:16 +00:00
Reid Kleckner 94a1c4d3f1 MS asm: The initial dot in struct access is optional
Fixes PR18994.

Tests, once again, in that other repository.  =P

llvm-svn: 203146
2014-03-06 19:19:12 +00:00
Reid Kleckner 4357f645f5 Revert create_symbolic_link and both depending changes
This reverts commits r203136, r203137, and r203138.

This code doesn't build on Windows.  Even on Vista+, Windows requires
elevated privileges to create a symlink.  Therefore we can't use
symlinks in the compiler.  We'll have to find another approach.

llvm-svn: 203143
2014-03-06 19:07:35 +00:00
Eric Christopher 2bed257af1 Move DIEEntry handling inside the main switch statement.
No functional change.

llvm-svn: 203142
2014-03-06 18:59:42 +00:00
Argyrios Kyrtzidis 62a979cccf [Support/LockFileManager] Make the LockFileManager more robust against races.
There was a race where:
- The LockFileManager tries to own the lock file and fails.
- The other owner then releases and removes the lock file.
- The LockFileManager tries to read the owner info from the lock file but fails now.

In such a case have LockFileManager try to get ownership again, instead of error'ing out.

llvm-svn: 203138
2014-03-06 17:37:10 +00:00
Argyrios Kyrtzidis 2eb8d02622 [Support/LockFileManager] Use symbolic link for the lock file.
Hard links do not work on SMB network directories, and it causes us to fail
to build clang module files if the module cache is in such a directory.
rdar://15944959

llvm-svn: 203137
2014-03-06 17:37:04 +00:00
Argyrios Kyrtzidis ec9dac2579 [Support/FileSystem] Introduce llvm::sys::fs::create_symbolic_link().
llvm-svn: 203136
2014-03-06 17:36:46 +00:00
Matt Arsenault f9a995d68c R600: Fix extloads from i8 / i16 to i64.
This appears to only be working for global loads. Private
and local break for other reasons.

llvm-svn: 203135
2014-03-06 17:34:12 +00:00
Matt Arsenault 9fe669c522 R600/SI: Expand selects on vectors.
llvm-svn: 203134
2014-03-06 17:34:03 +00:00
Matt Arsenault e6ed1d796f Fix missing C++ mode comment
llvm-svn: 203133
2014-03-06 17:33:58 +00:00
Matt Arsenault a236ea551c Teach lint about address spaces
llvm-svn: 203132
2014-03-06 17:33:55 +00:00
Richard Osborne 47155af5eb [XCore] Add support for the "m" inline asm constraint.
Summary:
This provides support for CP and DP relative global accesses in inline
asm.

Reviewers: robertlytton

Reviewed By: robertlytton

Differential Revision: http://llvm-reviews.chandlerc.com/D2943

llvm-svn: 203129
2014-03-06 16:37:48 +00:00
Rafael Espindola 736bec88cf Micro optimization: this code only needs to look at eh labels.
llvm-svn: 203127
2014-03-06 16:31:40 +00:00
Chad Rosier 86a8f72041 [AArch64] This is a work in progress to provide a machine description
for the Cortex-A53 subtarget in the AArch64 backend.

This patch lays the ground work to annotate each AArch64 instruction
(no NEON yet) with a list of SchedReadWrite types. The patch also
provides the Cortex-A53 processor resources, maps those the the default
SchedReadWrites, and provides basic latency. NEON support will be added
in a subsequent patch with proper forwarding logic.

Verification was done by setting the pre-RA scheduler to linearize to
better gauge the effect of the MIScheduler. Even without modeling the
forward logic, the results show a modest improvement for Cortex-A53.

Reviewers: apazos, mcrosier, atrick
Patch by Dave Estes <cestes@codeaurora.org>!

llvm-svn: 203125
2014-03-06 16:04:00 +00:00
Richard Sandiford b4d67b593e [SystemZ] Remove "virtual" from override methods
Also fix a couple of cases where "override" was missing.  No behavioural
change intended.

llvm-svn: 203110
2014-03-06 12:03:36 +00:00
Richard Sandiford 21f5d68a17 [SystemZ] Use "auto" for cast results
No functional change intended.

llvm-svn: 203106
2014-03-06 11:22:58 +00:00
Richard Sandiford 28c111ec8a [SystemZ] Use "for (auto" a bit
Just the simple cases for now.  There were a few knock-on changes of
MachineBasicBlock *s to MachineBasicBlock &s.  No functional change intended.

llvm-svn: 203105
2014-03-06 11:00:15 +00:00
Richard Sandiford c231269ff9 [SystemZ] Update namespace formatting to match current guidelines
No functional change intended.

llvm-svn: 203103
2014-03-06 10:38:30 +00:00
Elena Demikhovsky f7c1b16591 AVX-512: Added rrk, rrkz, rmk, rmkz, rmbk, rmbkz versions of AVX512 FP packed instructions, added encoding tests for them.
By Robert Khazanov.

llvm-svn: 203098
2014-03-06 08:45:30 +00:00
Elena Demikhovsky 8fae565f08 AVX-512: fixed comressed displacement - by Robert Khazanov
llvm-svn: 203096
2014-03-06 08:15:35 +00:00
Yaron Keren cf96c257f4 Cleaning up two more pre-Visual C++ 2012 build hacks.
llvm-svn: 203093
2014-03-06 08:05:43 +00:00
Ahmed Charles de14dcc24f Fix warnings about an variable only used in asserts.
llvm-svn: 203089
2014-03-06 06:35:46 +00:00
Ahmed Charles f6863f1aab Add <cstddef> for use of std::ptrdiff_t.
llvm-svn: 203086
2014-03-06 06:13:54 +00:00
Ahmed Charles 0a685a9a52 Fix break by qualifying ptrdiff_t with std::.
llvm-svn: 203084
2014-03-06 06:05:26 +00:00
Ahmed Charles 56440fd820 Replace OwningPtr<T> with std::unique_ptr<T>.
This compiles with no changes to clang/lld/lldb with MSVC and includes
overloads to various functions which are used by those projects and llvm
which have OwningPtr's as parameters. This should allow out of tree
projects some time to move. There are also no changes to libs/Target,
which should help out of tree targets have time to move, if necessary.

llvm-svn: 203083
2014-03-06 05:51:42 +00:00
David Blaikie 47c254beb7 DebugInfo: Tag units as having been indexed in GNU pubnames by using a DW_AT_GNU_pubnames of DW_FORM_flag(_present) rather than sec_offsets to the pubnames/types sections
This is consistent with GDB ToT and reduces the number of relocations in
(type and compile) units, substantially reducing relocations and debug
size in fission + type units builds.

llvm-svn: 203082
2014-03-06 05:47:39 +00:00
Karthik Bhat daa8cd10d9 Allow constant folding of copysign
llvm-svn: 203076
2014-03-06 05:32:52 +00:00
Chandler Carruth 3c57aa4111 [Modules] Fix a layering issue that is actually impacting the modules
selfhost.

The 'Core.h' C-API header is part of the IR LLVM library. (One might
even argue it should be called IR.h, but that's a separate point.) We
can't include it into a Support header without violating the layering,
and in a way that breaks modules. MemoryBuffer's opaque C type was being
defined in the Core.h C-API header despite being in the Support library,
and thus we ended up with this weird issue.

It turns out that there were other constructs from the Support library
in the Core.h header. This patch lifts all of them into Support.h and
then includes that into Core.h.

The only possible fallout is if someone was including Support.h and
relying on Core.h to be visible for their own uses. Considering the
narrow interface actually provided by the C-API for the Support library,
this seems a very, very unlikely mistake.

llvm-svn: 203071
2014-03-06 04:13:12 +00:00
Chandler Carruth d1163aa59e [Layering] Move GVMaterializer.h into the IR library where its
implementation already lived.

After this commit, the only IR-library headers in include/llvm/* are
ones related to the legacy pass infrastructure that I'm planning to
leave there until the new one is farther along.

The only other headers at the top level are linking and initialization
aids that aren't really libraries but just headers.

llvm-svn: 203069
2014-03-06 03:50:29 +00:00
Chandler Carruth 8a71625ad1 [cleanup] Re-sort the standard library include lines.
llvm-svn: 203066
2014-03-06 03:43:04 +00:00
Chandler Carruth 6cc07df4ec [Layering] Sink Linker.h into a Linker subdirectory to make it
consistent with every other sub-library header in LLVM.

llvm-svn: 203065
2014-03-06 03:42:23 +00:00
Chandler Carruth 7da14f1ab9 [Layering] Move InstVisitor.h into the IR library as it is pretty
obviously coupled to the IR.

llvm-svn: 203064
2014-03-06 03:23:41 +00:00
Owen Anderson bc46f3c15d Change the tag on this iterator to bidir and implement enough operators to make it true.
It ought to be possible to make this truly random access if anyone cares enough.

llvm-svn: 203060
2014-03-06 02:02:43 +00:00
Owen Anderson cab4afd7c6 Fix issues in the NamedMDNode operand iterator, including those pointed out by
Chandler in review.

llvm-svn: 203058
2014-03-06 01:51:01 +00:00
David Blaikie c3d9e9e55f DebugInfo: Shrink pubnames/pubtypes in the presence of type units by only emitting pub sections for compile units
llvm-svn: 203057
2014-03-06 01:42:00 +00:00
Eric Christopher 6bb07f6024 Add some helpful comments on DIEValue types that we expect to hash.
llvm-svn: 203055
2014-03-06 01:32:56 +00:00
Hal Finkel 6daf2aa140 The PPC global base register cannot be r0
The global base register cannot be r0 because it might end up as the first
argument to addi or addis. Fixes PR18316.

I don't have a small stable test case.

llvm-svn: 203054
2014-03-06 01:28:23 +00:00
Owen Anderson 9a6f50f61c Add a iterator and interator_range interface to the operands of a NamedMDNode.
The iterator is a little complex because we don't want to expose the implementation
details (TrackingVH) of the operand vector to clients.

llvm-svn: 203053
2014-03-06 01:12:56 +00:00
Chandler Carruth 9a4c9e597b [Layering] Move DebugInfo.h into the IR library where its implementation
already lives.

llvm-svn: 203046
2014-03-06 00:46:21 +00:00
Hal Finkel 7f908e8ef4 Fixup PPC Darwin i1 argument handling
Like on other targets, we need to zero_extend/truncate i1 args before copying
them to GPRs.

llvm-svn: 203045
2014-03-06 00:45:19 +00:00
Eric Christopher 193084979f Rewrite the attribute hashing algorithm to use the type of the value
pointed to by the attribute, rather than the form as a first
step to determining how to hash the values. No functional change
intended.

llvm-svn: 203044
2014-03-06 00:38:32 +00:00
Hal Finkel 2a9d318e4a When using CR bit registers on PPC32, handle the i1 vaarg case
When copying an i1 value into a GPR for a vaarg call, we need to explicitly
zero-extend the i1 value (otherwise an invalid CRBIT -> GPR copy will be
generated).

llvm-svn: 203041
2014-03-06 00:23:33 +00:00
Chandler Carruth 12664a0b17 [Layering] Move DIBuilder.h into the IR library where its implementation
already lives.

llvm-svn: 203038
2014-03-06 00:22:06 +00:00
Raul E. Silvera b741b945c5 Change math intrinsic attributes from readonly to readnone. These
are operations that do not access memory but may be sensitive
to floating-point environment changes. LLVM does not attempt
to model FP environment changes, so this was unnecessarily conservative
and was getting on the way of some optimizations, in particular
SLP vectorization.

llvm-svn: 203037
2014-03-06 00:18:15 +00:00
Eric Christopher dd508382cc Remove the last of the special case code for emitting attributes.
This works by moving the existing code into the DIEValue hierarchy
and using the DwarfDebug pointer off of the AsmPrinter to access
any global information we need.

llvm-svn: 203033
2014-03-06 00:00:56 +00:00
Eric Christopher 411bd590d1 constify a few accessors.
llvm-svn: 203032
2014-03-06 00:00:53 +00:00
Eric Christopher 13a1bb3720 Remove special case in the DIEValue printing since it only existed
for verbose asm.

llvm-svn: 203031
2014-03-06 00:00:49 +00:00
Rui Ueyama ad807658ea Attempt to unbreak little-endian buildbots.
llvm-svn: 203023
2014-03-05 23:03:37 +00:00
Jack Carter 6b9cf961bd [Mips] Testcase typo fix. No functionality change.
llvm-svn: 203020
2014-03-05 22:54:56 +00:00
Rafael Espindola 9251c42f72 Now that we don't use libtool, we don't need to upgrade it :-)
Thanks to Patrik Hägglund H for noticing it!

llvm-svn: 203019
2014-03-05 22:45:14 +00:00
Eric Christopher a27220fb8c Add a DIELocList class to handle pointers into the location list.
This enables us to figure out where in the debug_loc section our
locations are so that we can eventually hash them. It also helps
remove some special case code in emission. No functional change.

llvm-svn: 203018
2014-03-05 22:41:20 +00:00
Hal Finkel 6a56b21729 With PPC CR bit registers, handle int_to_fp on older cores
On cores without fpcvt support, we cannot promote int_to_fp i1 operations,
because there is nothing to promote them to. The most straightforward
implementation of this uses a select to choose between the two possible
resulting floating-point values (and that's what is done here).

llvm-svn: 203015
2014-03-05 22:14:00 +00:00
Matt Arsenault ca6dcfcf59 Fix typo
llvm-svn: 203013
2014-03-05 21:47:22 +00:00
JF Bastien d44807ca67 Fix datalayout test that I broke with my previous LinkModules warning improvement.
llvm-svn: 203011
2014-03-05 21:37:08 +00:00
JF Bastien 026fc5f6ab Improve LinkModules warnings
Provide triple and data layout as well as module names (or empty string) when there's a mismatch.

Differential Revision: http://llvm-reviews.chandlerc.com/D2971

llvm-svn: 203009
2014-03-05 21:26:42 +00:00
Arnold Schwaighofer ab12363c02 LoopVectorizer: Preserve fast-math flags
Fixes PR19045.

llvm-svn: 203008
2014-03-05 21:10:47 +00:00
Rafael Espindola 8377085657 Always print the implicit .text at the start of an asm file.
Before llvm-mc would print it, but llc was assuming that it would produce
another section changing directive before one was needed. That assumption is
false with inline asm.

Fixes PR19049.

Another option would be to always create the section, but in the asm printer
avoid printing sections changes during initialization. That would work, but
* We do use the fact that llvm-mc prints it in testing. The tests can be changed
  if needed.
* A quick poll on IRC suggest that most developers prefer the implicit .text to
  be printed.

llvm-svn: 203001
2014-03-05 20:09:15 +00:00
Ben Langmuir 8d11639612 Fix an inconsistency in treatment of trailing / in path::const_iterator
When using a //net/ path, we were transforming the trailing / into a '.'
when the path was just the root path and we were iterating backwards.
Forwards iteration and other kinds of root path (C:\, /) were already
correct.

llvm-svn: 202999
2014-03-05 19:56:30 +00:00
Benjamin Kramer 061d147f74 ConstantFolding: Also fold the vector overloads of our math intrinsics.
llvm-svn: 202997
2014-03-05 19:41:48 +00:00
Cameron McInally 791ae9927c Lower AVX v4i64->v4i32 truncate to one shuffle.
llvm-svn: 202996
2014-03-05 19:41:16 +00:00
David Blaikie 7f4a52eaee Fix clang -Werror build break due to mismatched sign comparison.
Originally committed in r202985.

llvm-svn: 202992
2014-03-05 18:53:36 +00:00