Michael Gottesman [Sat, 2 Mar 2013 00:53:20 +0000 (00:53 +0000)]
Revert "Rewrite a test to count emitted instructions without using -stats"
This reverts commit
aac7922b8fe7ae733d3fe6697e6789fd730315dc. I am reverting the
commit since it broke the phase 1 public buildbot for a few hours.
http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RA/builds/2137
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176394
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Fri, 1 Mar 2013 23:32:40 +0000 (23:32 +0000)]
Remove duplicate line and move another closer to its actual use
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176391
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 1 Mar 2013 23:31:26 +0000 (23:31 +0000)]
MIsched machine model: tablegen subtarget emitter improvement.
Fix the way resources are counted. I'm taking some time to cleanup the
way MachineScheduler handles in-order machine resources. Eventually
we'll need more PPC/Atom test cases in tree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176390
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 1 Mar 2013 22:48:51 +0000 (22:48 +0000)]
In llvm::MemoryBuffer::getFile() remove an unnecessary stat call check.
The sys::fs::is_directory() check is unnecessary because, if the filename is
a directory, the function will fail anyway with the same error code returned.
Remove the check to avoid an unnecessary stat call.
Someone needs to review on windows and see if the check is necessary there or not.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176386
91177308-0d34-0410-b5e6-
96231b3b80d8
Stefanus Du Toit [Fri, 1 Mar 2013 22:20:03 +0000 (22:20 +0000)]
Fix my email address in CREDITS.TXT.
Checking to see if svn notifications also use correct address now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176385
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 1 Mar 2013 21:52:08 +0000 (21:52 +0000)]
[mips] Fix inefficient code generation.
This patch eliminates the need to emit a constant move instruction when this
pattern is matched:
(select (setgt a, Constant), T, F)
The pattern above effectively turns into this:
(conditional-move (setlt a, Constant + 1), F, T)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176384
91177308-0d34-0410-b5e6-
96231b3b80d8
Jean-Luc Duprat [Fri, 1 Mar 2013 21:37:24 +0000 (21:37 +0000)]
Removed extraneous #include "LLVMContextImpl.h" from lib/IR/Module.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176382
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Fri, 1 Mar 2013 21:34:37 +0000 (21:34 +0000)]
Rewrite a test to count emitted instructions without using -stats
Also removed the comments of "should produce..." because they completely
don't match the actually produced output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176381
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 1 Mar 2013 21:22:21 +0000 (21:22 +0000)]
Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176380
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 1 Mar 2013 21:11:44 +0000 (21:11 +0000)]
Set properties for f128 type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176378
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Fri, 1 Mar 2013 20:54:00 +0000 (20:54 +0000)]
Rewrite a test to check actual output rather than intermediate implementation
detail.
The was this test was written, it was relying on an implementation detail
(fixups) and hence was very brittle (relying, among other things, on the
exact ordering of statistics printed by MC).
The test was rewritten to check a more observable output difference. While it
doesn't cover 100% of the things the original test covered, it's a good
practice to write regression tests this way. If we want to check that
internal details and invariants hold, such tests should be expressed as unit
tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176377
91177308-0d34-0410-b5e6-
96231b3b80d8
Edwin Vane [Fri, 1 Mar 2013 19:58:58 +0000 (19:58 +0000)]
No need to force-create clang-tools-extra lit.site.cfg
The make (all) target takes care of creating lit configs and auto-generating
tests. The problem with the original 'lit.site.cfg' target is it's not
recursive and doesn't fully create everything necessary for testing
clang-tools-extra.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176374
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Fri, 1 Mar 2013 19:23:37 +0000 (19:23 +0000)]
Add regression tests (WORKSFORME)
- These tests wont't crash on trunk but would be better to add them so that
they don't break again in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176369
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 1 Mar 2013 19:12:05 +0000 (19:12 +0000)]
Generate an error message instead of asserting or segfaulting when we can't
handle indirect register inputs.
rdar://
13322011
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176367
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 1 Mar 2013 19:07:31 +0000 (19:07 +0000)]
LoopVectorize: Don't hang forever if a PHI only has skipped PHI uses.
Fixes PR15384.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176366
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Fri, 1 Mar 2013 18:48:54 +0000 (18:48 +0000)]
Cache the result of Function::getIntrinsicID() in a DenseMap attached to the LLVMContext.
This reduces the time actually spent doing string to ID conversion and shows a 10% improvement in compile time for a particularly bad case that involves ARM Neon intrinsics (these have many overloads).
Patch by Jean-Luc Duprat!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176365
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Fri, 1 Mar 2013 18:40:30 +0000 (18:40 +0000)]
Fix PR10475
- ISD::SHL/SRL/SRA must have either both scalar or both vector operands
but TLI.getShiftAmountTy() so far only return scalar type. As a
result, backend logic assuming that breaks.
- Rename the original TLI.getShiftAmountTy() to
TLI.getScalarShiftAmountTy() and re-define TLI.getShiftAmountTy() to
return target-specificed scalar type or the same vector type as the
1st operand.
- Fix most TICG logic assuming TLI.getShiftAmountTy() a simple scalar
type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176364
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 1 Mar 2013 18:30:38 +0000 (18:30 +0000)]
Add support for using non-pic code for arm and thumb1 when emitting the sjlj
dispatch code. As far as I can tell the thumb2 code is behaving as expected.
I was able to compile and run the associated test case for both arm and thumb1.
rdar://
13066352
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176363
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Fri, 1 Mar 2013 17:39:05 +0000 (17:39 +0000)]
R600/SI: fix sampler tests after fixing wait insertions
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176359
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Fri, 1 Mar 2013 17:37:13 +0000 (17:37 +0000)]
Hexagon: Add constant extender support framework.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176358
91177308-0d34-0410-b5e6-
96231b3b80d8
Peng Cheng [Fri, 1 Mar 2013 16:49:35 +0000 (16:49 +0000)]
test commit to use consistent comment notation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176353
91177308-0d34-0410-b5e6-
96231b3b80d8
Yiannis Tsiouris [Fri, 1 Mar 2013 11:40:32 +0000 (11:40 +0000)]
GCInfoDeleter code cleanup after r175528
Remove GCInfoDeleter from passes and comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176347
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Fri, 1 Mar 2013 09:46:27 +0000 (09:46 +0000)]
R600/SI: handle all registers in copyPhysReg v2
v2: based on Michels patch, but now allows copying of all registers sizes.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176346
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Fri, 1 Mar 2013 09:46:22 +0000 (09:46 +0000)]
R600/SI: remove S_MOV immediate patterns
They won't match anyway.
Signed-off-by: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176345
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Fri, 1 Mar 2013 09:46:17 +0000 (09:46 +0000)]
R600/SI: remove GPR*AlignEncode
It's much easier to specify the encoding with tablegen directly.
Signed-off-by: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176344
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Fri, 1 Mar 2013 09:46:11 +0000 (09:46 +0000)]
R600/SI: fix warning about overloaded virtual
Signed-off-by: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176343
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Konig [Fri, 1 Mar 2013 09:46:04 +0000 (09:46 +0000)]
R600/SI: fix inserting waits for unordered defines
Signed-off-by: Christian König <christian.koenig@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176342
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 1 Mar 2013 09:46:03 +0000 (09:46 +0000)]
GCC thinks that this variable might be used uninitialized (it isn't).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176341
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 1 Mar 2013 07:58:27 +0000 (07:58 +0000)]
Docs for llvm-symbolizer command-line tool
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176337
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Fri, 1 Mar 2013 04:19:34 +0000 (04:19 +0000)]
Minor coding style fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176334
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 1 Mar 2013 02:17:02 +0000 (02:17 +0000)]
[mips] Remove unused option. Fix 80-column violations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176330
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 1 Mar 2013 02:03:51 +0000 (02:03 +0000)]
[mips] Add the capability to search delay slot filling instructions in
successor basic blocks.
Currently this is off by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176329
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 1 Mar 2013 01:22:26 +0000 (01:22 +0000)]
[mips] Do not add SecondLastInst to list BranchInstrs if there is only one
terminator.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176326
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 1 Mar 2013 01:10:17 +0000 (01:10 +0000)]
[mips] Define an overloaded version of function MipsInstrInfo::AnalyzeBranchAdd.
This function will be used later when the capability to search delay slot
filling instructions in successor blocks is added. No intended functionality
changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176325
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 1 Mar 2013 01:02:36 +0000 (01:02 +0000)]
[mips] Add options to disable searching backward and in successor blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176321
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 1 Mar 2013 00:50:52 +0000 (00:50 +0000)]
[mips] Add capability to search in the forward direction for instructions that
can fill the delay slot.
Currently, this is off by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176320
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 1 Mar 2013 00:26:14 +0000 (00:26 +0000)]
[mips] Define helper function searchRange
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176318
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 1 Mar 2013 00:20:16 +0000 (00:20 +0000)]
[mips] Rename function findDelayInstr to searchBackward.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176317
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 1 Mar 2013 00:19:14 +0000 (00:19 +0000)]
Scheduler diagnostics. Print the register name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176316
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 1 Mar 2013 00:19:12 +0000 (00:19 +0000)]
Fix incorrect ScheduleDAG comment and formalize Weak edges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176315
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 1 Mar 2013 00:19:09 +0000 (00:19 +0000)]
Instructions schedulers should report correct height/depth.
We avoided computing DAG height/depth during Node printing because it
shouldn't depend on an otherwise valid DAG. But this has become far
too annoying for the common case of a valid DAG where we want to see
valid values. If doing the computation on-the-fly turns out to be a
problem in practice, then I'll add a mode to the diagnostics to only
force it when we're likely to have a valid DAG, otherwise explicitly
print INVALID instead of bogus numbers. For now, just go for it all
the time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176314
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 1 Mar 2013 00:16:31 +0000 (00:16 +0000)]
[mips] Define class MemDefsUses.
This class tracks dependence between memory instructions using underlying
objects of memory operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176313
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Malea [Thu, 28 Feb 2013 23:15:15 +0000 (23:15 +0000)]
Connect LLVM CMake build scripts to LLDB's CMake scripts:
- if you have LLDB checked out in $llvm/tools, CMake will build it now!
- LLDB is known to build on Linux with libstdc++ and GCC 4.6/4.7 or Clang 3.3
- to run lldb tests, do "make check-lldb" after a build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176307
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Thu, 28 Feb 2013 23:09:18 +0000 (23:09 +0000)]
A small refactoring + adding comments.
SelectionDAGIsel::LowerArguments needs a function, not a basic block. So it
makes sense to pass it the function instead of extracting a basic-block from
the function and then tossing it. This is also more self-documenting (functions
have arguments, BBs don't).
In addition, added comments to a couple of Select* methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176305
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 28 Feb 2013 21:17:03 +0000 (21:17 +0000)]
Don't add the 'Value' string if there isn't one.
This was causing the folding set to fail to fold attributes, because it was
being calculated in one spot without an empty values string but here with an
empty values string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176301
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 28 Feb 2013 21:12:40 +0000 (21:12 +0000)]
Fix a bug in instcombine for fmul in fast math mode.
The instcombine recognized pattern looks like:
a = b * c
d = a +/- Cst
or
a = b * c
d = Cst +/- a
When creating the new operands for fadd or fsub instruction following the related fmul, the first operand was created with the second original operand (M0 was created with C1) and the second with the first (M1 with Opnd0).
The fix consists in creating the new operands with the appropriate original operand, i.e., M0 with Opnd0 and M1 with C1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176300
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 28 Feb 2013 20:26:17 +0000 (20:26 +0000)]
Move an assert earlier in a file and check that the result of
our bitwise compare is equal to the field we're looking for.
Noticed on inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176296
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 28 Feb 2013 19:33:46 +0000 (19:33 +0000)]
Brag about function call vectorization in the docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176292
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 28 Feb 2013 19:17:40 +0000 (19:17 +0000)]
Don't add an attribute that already exists and don't remove an attribute that doesn't exist.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176289
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 28 Feb 2013 19:16:42 +0000 (19:16 +0000)]
Tidy up; no functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176288
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 28 Feb 2013 19:09:33 +0000 (19:09 +0000)]
Cost model support for lowered math builtins.
We make the cost for calling libm functions extremely high as emitting the
calls is expensive and causes spills (on x86) so performance suffers. We still
vectorize important calls like ceilf and friends on SSE4.1. and fabs.
Differential Revision: http://llvm-reviews.chandlerc.com/D466
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176287
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 28 Feb 2013 18:54:27 +0000 (18:54 +0000)]
Style; no functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176285
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Thu, 28 Feb 2013 18:05:12 +0000 (18:05 +0000)]
Put some per-instruction statistics of fast isel under NDEBUG, together with
other per-instruction statistics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176273
91177308-0d34-0410-b5e6-
96231b3b80d8
Yiannis Tsiouris [Thu, 28 Feb 2013 16:59:10 +0000 (16:59 +0000)]
Re-format comments (and check commit access)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176270
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 28 Feb 2013 14:46:14 +0000 (14:46 +0000)]
AArch64: remove post-encoder method from FCMP (immediate) instructions.
The work done by the post-encoder (setting architecturally unused bits to 0 as
required) can be done by the existing operand that covers the "#0.0". This
removes at least one use of the discouraged PostEncoderMethod uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176261
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 28 Feb 2013 14:36:31 +0000 (14:36 +0000)]
AArch64: be more careful resorting to inefficient addressing for weak vars.
If an otherwise weak var is actually defined in this unit, it can't be
undefined at runtime so we can use normal global variable sequences (ADRP/ADD)
to access it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176259
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 28 Feb 2013 14:36:24 +0000 (14:36 +0000)]
AArch64: don't drop GlobalAddress offset when handling extern_weak decls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176258
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 28 Feb 2013 14:11:10 +0000 (14:11 +0000)]
Add the -disable-opt option to LTO. This adds:
- Consistency with opt (which supports the same option with the same meaning and
description).
- Debugging gold plugin-based linking without optimizations getting in the way.
- Debugging programs linked with the gold plugin while preserving the original
debug info.
- Fine-grained control over LTO passes using the gold plugin in combination with
opt (or clang/dragonegg).
Patch by Cristiano Giuffrida!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176257
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 28 Feb 2013 13:52:07 +0000 (13:52 +0000)]
AArch64: Use cbnz instead of cmp/b.ne pair for atomic operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176253
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 28 Feb 2013 11:25:14 +0000 (11:25 +0000)]
[msan] Implement sanitize_memory attribute.
Shadow checks are disabled and memory loads always produce fully initialized
values in functions that don't have a sanitize_memory attribute. Value and
argument shadow is propagated as usual.
This change also updates blacklist behaviour to match the above.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176247
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Thu, 28 Feb 2013 10:05:10 +0000 (10:05 +0000)]
Corrections for XFAIL armv5 tests
Most of the tests that behave differently on llvm-arm-linux buildbot
did so becase the triple wasn't set correctly to armv5, so we can
revert most of the special behaviour added previously. Some tests
still need the special treatment, though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176243
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 28 Feb 2013 08:42:11 +0000 (08:42 +0000)]
Remove unused leftover declarations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176240
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 28 Feb 2013 06:43:24 +0000 (06:43 +0000)]
Enable syntax highlighting for reStructuredText files.
Patch by Journeyer J. Joh!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176235
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 28 Feb 2013 01:44:26 +0000 (01:44 +0000)]
[Support][ErrorOr] Add support for implicit conversion from error code/condition enums.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176228
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 28 Feb 2013 00:38:19 +0000 (00:38 +0000)]
[PathV2] In llvm::sys::fs::unique_file, make sure it doesn't fall into an infinite loop by constantly trying
to create the parent path.
This can happen if the path is a relative filename and the current directory was removed.
Thanks to Daniel D. for the hint in fixing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176226
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Thu, 28 Feb 2013 00:24:45 +0000 (00:24 +0000)]
Fix a problem in alias analysis. It is about the misinterpretation of "Object".
This problem is exposed by r171325 which is already reverted. It is rather
hard to fabricate a testing case without it.
r171325 should *NOT* be resurrected as it has a potential problem although
this problem dosen't directly contribute to PR14988.
The bug is tracked by:
- rdar://
13063553, and
- http://llvm.org/bugs/show_bug.cgi?id=14988
Thank Arnold for coming up a better solution to this problem. After
comparing this solution and my original proposal, I decided to ditch mine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176225
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 27 Feb 2013 23:49:50 +0000 (23:49 +0000)]
Remove unnecessary check against isGlobalVariable. We check it
a few lines above.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176224
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 27 Feb 2013 23:49:47 +0000 (23:49 +0000)]
Rework comment slightly and fix a few typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176223
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 27 Feb 2013 23:49:45 +0000 (23:49 +0000)]
Remove unnecessary cast to void.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176222
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Wed, 27 Feb 2013 23:21:02 +0000 (23:21 +0000)]
Debug Info: for static member variables, always put AT_MIPS_linkage_name to the
definition DIE (TAG_variable), and put AT_MIPS_linkage_name to TAG_member when
DarwinGDBCompat is true.
Darwin GDB needs AT_MIPS_linkage_name at both places to work.
Follow-up patch to r176143.
rdar://problem/
13291234
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176220
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 27 Feb 2013 22:52:54 +0000 (22:52 +0000)]
Silence the unused variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176218
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 27 Feb 2013 21:59:43 +0000 (21:59 +0000)]
The FastISEL should be fast. But when we record statistics we use atomic operations to increment the counters.
This patch disables the counters on non-debug builds. This reduces the runtime of SelectionDAGISel::SelectCodeCommon by ~5%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176214
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 27 Feb 2013 21:44:59 +0000 (21:44 +0000)]
Copy missing member in DataLayout copy ctor.
Test case is missing due to it not being reachable through the current tools
but out of tree code such as the sample at
http://llvm.org/docs/tutorial/LangImpl4.html
Patch by Peng Cheng <gm4cheng@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176213
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 27 Feb 2013 21:31:12 +0000 (21:31 +0000)]
ARM: FMA is legal only if VFP4 is available.
rdar://
13306723
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176212
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 27 Feb 2013 20:34:14 +0000 (20:34 +0000)]
Remove this instance of dl as it's defined in a previous scope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176208
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Wed, 27 Feb 2013 19:54:00 +0000 (19:54 +0000)]
Reverted: r176136 - Have a way for a target to opt-out of target-independent fast isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176204
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 27 Feb 2013 18:48:42 +0000 (18:48 +0000)]
[docs] Discuss manpage output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176199
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 27 Feb 2013 18:38:33 +0000 (18:38 +0000)]
Switching -1ULL to UINT64_MAX to fix MSVC warnings. Patch thanks to Peng Cheng!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176197
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Wed, 27 Feb 2013 18:33:21 +0000 (18:33 +0000)]
[docs] Provide pointer for building Sphinx docs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176195
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 27 Feb 2013 18:25:41 +0000 (18:25 +0000)]
Suppressing MSVC warnings; patch thanks to Peng Cheng!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176193
91177308-0d34-0410-b5e6-
96231b3b80d8
Shankar Easwaran [Wed, 27 Feb 2013 17:57:17 +0000 (17:57 +0000)]
print TLS segment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176192
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 27 Feb 2013 16:43:09 +0000 (16:43 +0000)]
ARM: permit full range of valid ADR immediates.
This fixes an issue where trying to assemlbe valid ADR instructions would cause
LLVM to hit a failed assertion.
Patch by Keith Walker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176189
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 27 Feb 2013 15:24:19 +0000 (15:24 +0000)]
LoopVectorize: Vectorize math builtin calls.
This properly asks TargetLibraryInfo if a call is available and if it is, it
can be translated into the corresponding LLVM builtin. We don't vectorize sqrt()
yet because I'm not sure about the semantics for negative numbers. The other
intrinsic should be exact equivalents to the libm functions.
Differential Revision: http://llvm-reviews.chandlerc.com/D465
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176188
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 27 Feb 2013 08:28:35 +0000 (08:28 +0000)]
Forgot that this file needs to be C89 not C99 thanks to MSVC. No functionality
change!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176176
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 27 Feb 2013 06:22:56 +0000 (06:22 +0000)]
In GCC 4.7, function names are now forbidden from .gcda files. Support this by
passing a null pointer to the function name in to GCDAProfiling, and add another
switch onto GCOVProfiling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176173
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 27 Feb 2013 06:21:30 +0000 (06:21 +0000)]
Doh, fix behaviour change introduced in r176168 which is tested in clang,
not llvm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176172
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 27 Feb 2013 05:56:20 +0000 (05:56 +0000)]
Revert r176166 because it broke one of the lit tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176171
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 27 Feb 2013 05:53:43 +0000 (05:53 +0000)]
For each function that we optimize we initialize a new list of lib functions. For each function name we malloc memory. This patch changes the Libcall map to use BumpPtrAllocator. Now we malloc only once. This speeds up instcombine by a few % on a large c++ program.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176170
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 27 Feb 2013 05:46:30 +0000 (05:46 +0000)]
IRBuilder has grown all sorts of useful utility functions. Make use of them to
clean up this code a tiny bit. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176168
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 27 Feb 2013 05:23:56 +0000 (05:23 +0000)]
std::string to StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176166
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Wed, 27 Feb 2013 04:20:14 +0000 (04:20 +0000)]
Fix cut/paste error in a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176165
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Wed, 27 Feb 2013 03:33:58 +0000 (03:33 +0000)]
Add the skeleton for the Mips constant island pass.
It will only be used for Mips 16 at this time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176161
91177308-0d34-0410-b5e6-
96231b3b80d8
Meador Inge [Wed, 27 Feb 2013 02:26:42 +0000 (02:26 +0000)]
IR: Don't constant fold GEP bitcasts between different address spaces
PR15262 reported a bug where the following instruction:
i8 getelementptr inbounds i8* bitcast ([4 x i8] addrspace(12)* @buf to i8*),
i32 2
was getting folded into:
addrspace(12)* getelementptr inbounds ([4 x i8] addrspace(12)* @buf, i32 0,
i32 2)
This caused instcombine to crash because the original instruction and
the folded instruction have different types. The issue was fixed by
disallowing bitcasts between different address spaces to be folded away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176156
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Wed, 27 Feb 2013 02:11:57 +0000 (02:11 +0000)]
SelectionDAG: If llvm.donothing has a landingpad, we should clear
CurrentCallSite to avoid an assertion failure:
assert(MMI.getCurrentCallSite() == 0 && "Overlapping call sites!");
rdar://problem/
13228754
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176154
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Wed, 27 Feb 2013 00:02:32 +0000 (00:02 +0000)]
Debug Info: for static member variables, add AT_MIPS_linkage_name to the
definition DIE, to make old GDB happy.
We have a regression for old GDB when Clang uses DW_TAG_member to declare
static members inside a class, instead of DW_TAG_variable. This patch will fix
this regression.
rdar://problem/
13291234
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176143
91177308-0d34-0410-b5e6-
96231b3b80d8
Pedro Artigas [Tue, 26 Feb 2013 23:33:20 +0000 (23:33 +0000)]
Enhance integer division emulation support to handle types smaller than 32 bits,
enhancement done the trivial way; by extending inputs and truncating outputs
which is addequate for targets with little or no support for integer arithmetic
on integer types less than 32 bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176139
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Tue, 26 Feb 2013 23:15:23 +0000 (23:15 +0000)]
Have a way for a target to opt-out of target-independent fast isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176136
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 26 Feb 2013 23:04:17 +0000 (23:04 +0000)]
Try to get rid of a -wunitialized warning: explicitly initialize the pointer
to NULL and use asserts to check in relevant places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176134
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Ilseman [Tue, 26 Feb 2013 22:51:07 +0000 (22:51 +0000)]
Constant fold vector bitcasts of halves similarly to how floats and doubles are folded. Test case included.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176131
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Tue, 26 Feb 2013 22:41:01 +0000 (22:41 +0000)]
Add support for autodetection of ADM bdver2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176130
91177308-0d34-0410-b5e6-
96231b3b80d8