OSDN Git Service
Rafael Espindola [Fri, 28 Feb 2014 16:16:51 +0000 (16:16 +0000)]
With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202510
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 28 Feb 2014 16:11:03 +0000 (16:11 +0000)]
Correctly set rpath for unittests.
This lets us run the unittest from the command line without setting
LD_LIBRARY_PATH.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202509
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 28 Feb 2014 13:48:03 +0000 (13:48 +0000)]
Centralize the handling of install_name and rpath.
This centralizes the Makefile handling of -install_name and -rpath. It also
moves the cmake build to using @rpath. The reason being that libclang needs it,
and it works for everything else.
A followup patch will move clang to using this and then there will be a single
point to edit to support other systems.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202499
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 28 Feb 2014 13:35:54 +0000 (13:35 +0000)]
[docs] Add a section to the coding standards about languages and such.
A lot of this is writing down common knowledge and things often
communicated on mailing lists and in discussions. It could live in the
Programmer's Manual alternatively, but that felt slightly less
well-fitting.
It also includes (and was motivated by) the section on the relevant
language standards for LLVM and the specific features that will be
enabled with the switch to C++11.
With this, all of the documentation for the C++11 switch is, I think, in
place. I plan to flip the switch RSN. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202497
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Fri, 28 Feb 2014 12:28:07 +0000 (12:28 +0000)]
X86Operand is extracted into individual header.
X86Operand is extracted into individual header, because it allows to create an
arbitrary memory operand and append it to MCInst. It'll be reused in X86 inline
assembly instrumentation.
Patch by Yuri Gorshenin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202496
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 28 Feb 2014 12:24:18 +0000 (12:24 +0000)]
[docs] A slight tweak to the intro for the golden rule in the coding
standards.
It claims the document intentionally doesn't give fixed standards for
brace placement or spacing, and then the document goes on to do
precisely that in several places. Instead, try to highlight that even
these rules are simply *guidance* which may be trumped by some other
circumstance or the local conventions of code.
I'm not trying to change the thrust of this part of the document, and if
folks think this does so, I'm happy to re-wordsmith it. I just don't
want it to be so self-contradicting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202495
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 28 Feb 2014 12:14:56 +0000 (12:14 +0000)]
[docs] Tweak the example to match what is apparantly the desired form
for the style templates we're using.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202494
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 28 Feb 2014 12:09:14 +0000 (12:09 +0000)]
[docs] Switch to external hyperlink references. Much more readable and
hopefully easier to get the formatting right for ReST.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202493
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 28 Feb 2014 11:12:14 +0000 (11:12 +0000)]
[docs] Fix my links to use the correct ReST syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202490
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 28 Feb 2014 11:11:41 +0000 (11:11 +0000)]
[docs] Fix 80-column wrap that I messed up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202489
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 28 Feb 2014 11:09:33 +0000 (11:09 +0000)]
[docs] Tweak discussion of BSDs based on feedback from Roman Divacky.
FreeBSD 10.0 and newer have a modern Clang toolchain that should work
well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202488
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 28 Feb 2014 10:56:57 +0000 (10:56 +0000)]
[docs] Add a big section with details about how to go about acquiring
a more modern host C++ toolchain for Linux distros where folks sometimes
don't have a good option to get one as part of their system.
This is a first cut, so feedback, testing, and suggestions are very,
very welcom. This is one of the last real documentation changes that was
specifically requested prior to switching LLVM and Clang to build in
C++11 mode by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202486
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 28 Feb 2014 10:18:21 +0000 (10:18 +0000)]
Reorder Mips/MCTargetDesc/CMakeLists.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202483
91177308-0d34-0410-b5e6-
96231b3b80d8
Sasa Stankovic [Fri, 28 Feb 2014 10:14:12 +0000 (10:14 +0000)]
[mips] Add MipsNaClELFStreamer.cpp to CMakeLists.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202482
91177308-0d34-0410-b5e6-
96231b3b80d8
Sasa Stankovic [Fri, 28 Feb 2014 10:00:38 +0000 (10:00 +0000)]
[mips] Implement NaCl sandboxing of indirect jumps:
* Align targets of indirect jumps to instruction bundle boundaries (in MI layer).
* Add masking instructions before indirect jumps (in MC layer).
Differential Revision: http://llvm-reviews.chandlerc.com/D2847
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202479
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Fri, 28 Feb 2014 09:08:45 +0000 (09:08 +0000)]
Add 'remark' diagnostic type in LLVM
A 'remark' is information that is not an error or a warning, but rather some
additional information provided to the user. In contrast to a 'note' a 'remark'
is an independent diagnostic, whereas a 'note' always depends on another
diagnostic.
A typical use case for remark nodes is information provided to the user, e.g.
information provided by the vectorizer about loops that have been vectorized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202474
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 28 Feb 2014 08:23:09 +0000 (08:23 +0000)]
Turn static inline functions to inline, following Rafael's suggestion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202473
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 28 Feb 2014 06:11:16 +0000 (06:11 +0000)]
Swap PPC isel operands to allow for 0-folding
The PPC isel instruction can fold 0 into the first operand (thus eliminating
the need to materialize a zero-containing register when the 'true' result of
the isel is 0). When the isel is fed by a bit register operation that we can
invert, do so as part of the bit-register-operation peephole routine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202469
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Fri, 28 Feb 2014 05:21:29 +0000 (05:21 +0000)]
llvm-objdump: Fix crash bug with printing unwind info on stripped file.
The current COFF unwind printer tries to print SEH handler function names,
assuming that it can always find function names in string table. It crashes
if file being read has no symbol table (i.e. executable).
With this patch, llvm-objdump prints SEH handler's RVA if there's no symbol
table entry for that RVA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202466
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Fri, 28 Feb 2014 05:21:26 +0000 (05:21 +0000)]
Style fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202465
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 28 Feb 2014 02:17:23 +0000 (02:17 +0000)]
Now that it is possible, use the mangler in IRObjectFile.
A really simple patch marks the end of a lot of yak shaving :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202463
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Fri, 28 Feb 2014 01:18:58 +0000 (01:18 +0000)]
Rename coff_pdata_x64 -> coff_runtime_function_x64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202460
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 28 Feb 2014 01:17:25 +0000 (01:17 +0000)]
Trying to unbreak the darwin11 builder
The CR bit tracking code broke PPC/Darwin; trying to get it working again...
(the darwin11 builder, which defaults to the darwin ABI when running PPC tests,
asserted when running test/CodeGen/PowerPC/inverted-bool-compares.ll)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202459
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 28 Feb 2014 00:45:27 +0000 (00:45 +0000)]
Try to unbreak the C++11 build
Cannot use negative numbers in case statements without running afoul of -Wc++11-narrowing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202455
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 28 Feb 2014 00:28:13 +0000 (00:28 +0000)]
[CMake] llvm_add_library(SHARED|STATIC): Fix broken OUTPUT_NAME for *_static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202454
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 28 Feb 2014 00:27:01 +0000 (00:27 +0000)]
Add CR-bit tracking to the PowerPC backend for i1 values
This change enables tracking i1 values in the PowerPC backend using the
condition register bits. These bits can be treated on PowerPC as separate
registers; individual bit operations (and, or, xor, etc.) are supported.
Tracking booleans in CR bits has several advantages:
- Reduction in register pressure (because we no longer need GPRs to store
boolean values).
- Logical operations on booleans can be handled more efficiently; we used to
have to move all results from comparisons into GPRs, perform promoted
logical operations in GPRs, and then move the result back into condition
register bits to be used by conditional branches. This can be very
inefficient, because the throughput of these CR <-> GPR moves have high
latency and low throughput (especially when other associated instructions
are accounted for).
- On the POWER7 and similar cores, we can increase total throughput by using
the CR bits. CR bit operations have a dedicated functional unit.
Most of this is more-or-less mechanical: Adjustments were needed in the
calling-convention code, support was added for spilling/restoring individual
condition-register bits, and conditional branch instruction definitions taking
specific CR bits were added (plus patterns and code for generating bit-level
operations).
This is enabled by default when running at -O2 and higher. For -O0 and -O1,
where the ability to debug is more important, this feature is disabled by
default. Individual CR bits do not have assigned DWARF register numbers,
and storing values in CR bits makes them invisible to the debugger.
It is critical, however, that we don't move i1 values that have been promoted
to larger values (such as those passed as function arguments) into bit
registers only to quickly turn around and move the values back into GPRs (such
as happens when values are returned by functions). A pair of target-specific
DAG combines are added to remove the trunc/extends in:
trunc(binary-ops(binary-ops(zext(x), zext(y)), ...)
and:
zext(binary-ops(binary-ops(trunc(x), trunc(y)), ...)
In short, we only want to use CR bits where some of the i1 values come from
comparisons or are used by conditional branches or selects. To put it another
way, if we can do the entire i1 computation in GPRs, then we probably should
(on the POWER7, the GPR-operation throughput is higher, and for all cores, the
CR <-> GPR moves are expensive).
POWER7 test-suite performance results (from 10 runs in each configuration):
SingleSource/Benchmarks/Misc/mandel-2: 35% speedup
MultiSource/Benchmarks/Prolangs-C++/city/city: 21% speedup
MultiSource/Benchmarks/MiBench/automotive-susan: 23% speedup
SingleSource/Benchmarks/CoyoteBench/huffbench: 13% speedup
SingleSource/Benchmarks/Misc-C++/Large/sphereflake: 13% speedup
SingleSource/Benchmarks/Misc-C++/mandel-text: 10% speedup
SingleSource/Benchmarks/Misc-C++-EH/spirit: 10% slowdown
MultiSource/Applications/lemon/lemon: 8% slowdown
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202451
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 28 Feb 2014 00:26:56 +0000 (00:26 +0000)]
Add an OutPatFrag TableGen class
Unfortunately, it is currently impossible to use a PatFrag as part of an output
pattern (the part of the pattern that has instructions in it) in TableGen.
Looking at the current implementation, this was clearly intended to work (there
is already code in place to expand patterns in the output DAG), but is
currently broken by the baked-in type-checking assumption and the order in which
the pattern fragments are processed (output pattern fragments need to be
processed after the instruction definitions are processed).
Fixing this is fairly simple, but requires some way of differentiating output
patterns from the existing input patterns. The simplest way to handle this
seems to be to create a subclass of PatFrag, and so that's what I've done here.
As a simple example, this allows us to write:
def crnot : OutPatFrag<(ops node:$in),
(CRNOR $in, $in)>;
def : Pat<(not i1:$in),
(crnot $in)>;
which captures the core use case: handling of repeated subexpressions inside
of complicated output patterns.
This will be used by an upcoming commit to the PowerPC backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202450
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Fri, 28 Feb 2014 00:26:45 +0000 (00:26 +0000)]
Fix visitTRUNCATE for legal i1 values
This extract-and-trunc vector optimization cannot work for i1 values as
currently implemented, and so I'm disabling this for now for i1 values. In the
future, this can be fixed properly.
Soon I'll commit support for i1 CR bit tracking in the PowerPC backend, and
this will be covered by one of the existing regression tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202449
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Fri, 28 Feb 2014 00:06:20 +0000 (00:06 +0000)]
Remove unnecessary temporary variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202445
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Thu, 27 Feb 2014 22:20:07 +0000 (22:20 +0000)]
Object/COFF: Add a struct for the function table in .pdata.
This is the data structure listed on Microsoft PE/COFF Spec Revision 8.3, p. 80.
The name of the struct is not mentioned in the Microsoft PE/COFF spec, so I made
it up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202438
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 27 Feb 2014 21:37:33 +0000 (21:37 +0000)]
Provide a target override for the latest regalloc heuristic.
This is a temporary workaround for native arm linux builds:
PR18996: Changing regalloc order breaks "lencod" on native arm linux builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202433
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 27 Feb 2014 21:37:30 +0000 (21:37 +0000)]
Drive-by comment fix. This regalloc comment was not accurate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202432
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 27 Feb 2014 21:19:42 +0000 (21:19 +0000)]
[docs] Stop advertising 'make update'. It isn't implemented in CMake and
seems unlikely to be added. It also doesn't seem like it should be part
of the build system at all (consider out-of-tree builds).
We should probably add nice, easy tool for this that works both for svn
client trees and git-svn client trees, but it probably won't be spelled
"make update".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202430
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Thu, 27 Feb 2014 19:26:29 +0000 (19:26 +0000)]
Lower FNEG just like FABS to fneg[ds] and fmov[ds], thus avoiding
expensive libcall. Also, Qp_neg is not implemented on at least
FreeBSD. This is also what gcc is doing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202422
91177308-0d34-0410-b5e6-
96231b3b80d8
Matheus Almeida [Thu, 27 Feb 2014 18:39:53 +0000 (18:39 +0000)]
Add getter method to access Reloc::Model.
Some MC components like Target Streamers or Assembly Parsers
may need to access the relocation model in order to expand
some directives and/or assembly macros.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202418
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 27 Feb 2014 18:36:10 +0000 (18:36 +0000)]
Revert r201751 and solve the const problem a different way - by
making the cache mutable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202417
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 27 Feb 2014 17:56:08 +0000 (17:56 +0000)]
Debug info: Remove ARMAsmPrinter::EmitDwarfRegOp(). AsmPrinter can now
scan the register file for sub- and super-registers.
No functionality change intended.
(Tests are updated because the comments in the assembler output are
different.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202416
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Thu, 27 Feb 2014 17:47:54 +0000 (17:47 +0000)]
[XCore] Support functions returning more than 4 words.
If a function returns a large struct by value return the first 4 words
in registers and the rest on the stack in a location reserved by the
caller. This is needed to support the xC language which supports
functions returning an arbitrary number of return values. This is
r202397 reapplied with a fix to avoid an uninitialized read of a member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202414
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Thu, 27 Feb 2014 17:47:48 +0000 (17:47 +0000)]
[XCore] Make LowerCallResult a static function.
No functionality change. This is r202396 reapplied with no changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202413
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 27 Feb 2014 16:17:34 +0000 (16:17 +0000)]
Remove MCPureStreamer.
We moved MCJIT to use native object formats a long time ago and R600
now uses ELF, so it was dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202408
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Thu, 27 Feb 2014 14:47:37 +0000 (14:47 +0000)]
Re-apply r200853, which should not crash after Clang plugins were converted to loadable modules in r201256.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202404
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Thu, 27 Feb 2014 14:24:13 +0000 (14:24 +0000)]
Revert r202396, r202397.
These are causing test failures, revert for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202398
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Thu, 27 Feb 2014 14:00:40 +0000 (14:00 +0000)]
[XCore] Support functions returning more than 4 words.
Summary:
If a function returns a large struct by value return the first 4 words
in registers and the rest on the stack in a location reserved by the
caller. This is needed to support the xC language which supports
functions returning an arbitrary number of return values.
Reviewers: robertlytton
Reviewed By: robertlytton
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2889
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202397
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Thu, 27 Feb 2014 14:00:34 +0000 (14:00 +0000)]
[XCore] Make LowerCallResult a static function.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202396
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Thu, 27 Feb 2014 13:39:07 +0000 (13:39 +0000)]
[XCore] Target optimized library function __memcpy_4()
Summary:
If the src, dst and size of a memcpy are known to be 4 byte aligned we
can call __memcpy_4() instead of memcpy().
Reviewers: robertlytton
Reviewed By: robertlytton
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2871
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202395
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Thu, 27 Feb 2014 13:20:11 +0000 (13:20 +0000)]
[XCore] Add dag combines for instructions that ignore some input bits.
These instructions ignore the high bits of one of their input operands -
try and use this to simplify the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202394
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Thu, 27 Feb 2014 13:20:06 +0000 (13:20 +0000)]
[XCore] Provide information about known zero bits of resource instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202393
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 27 Feb 2014 13:13:59 +0000 (13:13 +0000)]
[asan] fix a pair of silly typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202391
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 27 Feb 2014 12:56:20 +0000 (12:56 +0000)]
[asan] disable asan-detect-invalid-pointer-pair (was enabled by mistake)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202390
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 27 Feb 2014 12:45:36 +0000 (12:45 +0000)]
[asan] *experimental* implementation of invalid-pointer-pair detector (finds when two unrelated pointers are compared or subtracted). This implementation has both false positives and false negatives and is not tuned for performance. A bug report for a proper implementation will follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202389
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 27 Feb 2014 10:35:57 +0000 (10:35 +0000)]
[docs] Actually spell out the new version requirements for the host C++
toolchain of LLVM. These are already being enforced by the build system
and have been discussed quite a few times on the lists, but
documentation is important. =]
Also, garbage collect the majority of the information about broken host
GCC toolchains. These aren't really relevant any more as they're all
older than the minimum requirement. I've left a few notes about
compilers one step older than the current requirement as these compilers
are at least conceivable to use, and it's better to preserve this kind
of hard-won institutional knowledge.
The next step will be some specific docs on how to set up a sufficiently
modern host toolchain if your system doesn't come with one. But that'll
be tomorrow. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202375
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 27 Feb 2014 09:57:48 +0000 (09:57 +0000)]
[docs] Clean up some of the required software to not mention irrelevant
bits of software and to use a modern GCC version.
The Subversion bit was weird anyways -- it has nothing to do with
compiling LLVM. Also, there are many other ways to get at the trunk
source (git, git-svn, etc).
The TeXinfo thing... I have no idea about. But you can get a working
LLVM w/o it pretty easily. If man pages or something are missing, that
hardly seems like a problem. If folks really want this back, let me
know, but it seems mostly like a distraction.
I'd still like to separate this into:
- Required software to compile.
- Optional software to compile.
- Required software for certain *contributor* activities (like
regenerating configure scripts).
Also we need to mention that there are multiple options for build
systems, and the differences.
Also we should mention Windows.
Also probably other stuff I'm forgetting.
I'm wondering if this whole thing needs to be shot in the head and we
should just start a new, simpler getting started that doesn't have so
many years of accumulated stuff that is no longer relevant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202373
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 27 Feb 2014 09:46:09 +0000 (09:46 +0000)]
[docs] Switch this table to the simple form as well. No content changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202372
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 27 Feb 2014 09:41:13 +0000 (09:41 +0000)]
[docs] Switch to the incredibly simpler "simple table" form. It now
actually looks like the table on the webpage and is entertainingly
smaller, easier to read, and easier to edit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202371
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 27 Feb 2014 09:33:55 +0000 (09:33 +0000)]
[docs] Delete tons of bad information in the requirements section of the
getting started guide.
Some highlights:
- I heard there was this Clang compiler that you could use for your
host compiler. Not sure though.
- We no longer have a GCC frontend with weird build restrictions.
- Windows is doing a bit better than partially supported.
- We nuked everything to do with itanium.
- SPUs? Really?
- Xcode 2.5 and gcc 4.0.1 are really not a concern -- they don't work.
- OMG, we actually tried building LLVM on Alpha? Really?
- PowerPC works pretty well these days.
There is still a lot of stuff here I'm pretty dubious about, but I nuked
most of what was actively misleading, out of date, or patently wrong.
Some of it (mingw stuff especially) isn't really lacking, its just that
the comments here were actively wrong. Hopefully folks that know those
platforms can add back correct / modern information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202370
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 27 Feb 2014 09:24:31 +0000 (09:24 +0000)]
Stop test/CodeGen/X86/v4i32load-crash.ll targeting non-X86-64 targets.
Summary:
Fixes an issue where a test attempts to use -mcpu=x86-64 on non-X86-64 targets.
This triggers an assertion in the MIPS backend since it doesn't know what ABI to
use by default for unrecognized processors.
CC: llvm-commits, rafael
Differential Revision: http://llvm-reviews.chandlerc.com/D2877
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202369
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 27 Feb 2014 08:59:01 +0000 (08:59 +0000)]
[CMake] Introduce LLVM_BUILD_EXTERNAL_COMPILER_RT option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202363
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 27 Feb 2014 07:44:45 +0000 (07:44 +0000)]
Don't emit anything into the debug_ranges section if we aren't emitting
any ranges - this includes CU ranges where we were previously emitting an
end list marker even if we didn't have a list.
Testcase includes a test for line table only code emission as the problem
was noticed while writing this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202357
91177308-0d34-0410-b5e6-
96231b3b80d8
Mark Seaborn [Thu, 27 Feb 2014 06:54:04 +0000 (06:54 +0000)]
Exception handling docs: Fix a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202354
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 27 Feb 2014 05:08:25 +0000 (05:08 +0000)]
[X86] Fix Uses/Defs lists for INS, OUTS, SCAS, CMPS, LODS
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202348
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 27 Feb 2014 04:27:00 +0000 (04:27 +0000)]
[X86] Add RAX/EAX/AX Uses/Defs to XCHG RAX/EAX/AX instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202347
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 27 Feb 2014 04:07:57 +0000 (04:07 +0000)]
[X86] Add RAX/EAX/AX/AL Uses/Defs to the absolute memory location move instructions. Patch by Florian Lukas with some additional instructions fixed by me. Fixes PR18975.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202345
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 27 Feb 2014 03:30:36 +0000 (03:30 +0000)]
Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202344
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 27 Feb 2014 03:11:13 +0000 (03:11 +0000)]
Fix odd indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202342
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Thu, 27 Feb 2014 03:10:10 +0000 (03:10 +0000)]
Revert "Use count 0."
This reverts commit r202283, because when we use GuardMalloc the test will fail
due to additional output to std err.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202341
91177308-0d34-0410-b5e6-
96231b3b80d8
Ben Langmuir [Thu, 27 Feb 2014 02:09:10 +0000 (02:09 +0000)]
Revert "Use StringRef in raw_fd_ostream constructor"
This reverts commit r202225, which may cause a performance regression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202338
91177308-0d34-0410-b5e6-
96231b3b80d8
Michel Danzer [Thu, 27 Feb 2014 01:47:09 +0000 (01:47 +0000)]
R600/SI: Optimize SI_KILL for constant operands
If the SI_KILL operand is constant, we can either clear the exec mask if
the operand is negative, or do nothing otherwise.
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202337
91177308-0d34-0410-b5e6-
96231b3b80d8
Michel Danzer [Thu, 27 Feb 2014 01:47:02 +0000 (01:47 +0000)]
R600/SI: Allow SI_KILL for geometry shaders
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202336
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 27 Feb 2014 01:25:00 +0000 (01:25 +0000)]
If we're only emitting line tables for a particular CU then don't add
any ranges to the list of ranges for the CU as we don't want to emit
them anyway. This ensures that we will still emit ranges if we have
a compile unit compiled with only line tables and one compiled with
full debug info requested (we'll emit for the one with full debug info).
Update testcase metadata accordingly to continue emitting ranges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202333
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 27 Feb 2014 01:24:56 +0000 (01:24 +0000)]
Add a debug info code generation level to the compile unit metadata
and update everything accordingly. This can be used to conditionalize
the amount of output in the backend based on the amount of debug
requested/metadata emission scheme by a front end (e.g. clang).
Paired with a commit to clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202332
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 27 Feb 2014 00:15:44 +0000 (00:15 +0000)]
Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202323
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 27 Feb 2014 00:04:54 +0000 (00:04 +0000)]
Add an explanatory comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202321
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 26 Feb 2014 23:54:42 +0000 (23:54 +0000)]
Grammar and spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202318
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Wed, 26 Feb 2014 23:46:39 +0000 (23:46 +0000)]
Fix a type error that crept into r202313.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202317
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 26 Feb 2014 23:27:16 +0000 (23:27 +0000)]
Remove unnecessary llvm:: qualification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202316
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 26 Feb 2014 23:22:49 +0000 (23:22 +0000)]
Use regnum regex in an XCore test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202315
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Wed, 26 Feb 2014 23:03:37 +0000 (23:03 +0000)]
Debug info: Refactor AsmPrinter::EmitDwarfRegOp to make the control flow
more obvious.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202313
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 26 Feb 2014 23:00:58 +0000 (23:00 +0000)]
R600: Remove unnecessary build_vector pattern.
It is already fully handled in AMDGPUISelDAGToDAG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202312
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 26 Feb 2014 22:39:59 +0000 (22:39 +0000)]
Very temporarily XFAILing a test. Will be fixed shortly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202310
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Wed, 26 Feb 2014 22:29:11 +0000 (22:29 +0000)]
Fix broken FileCheck prefixes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202308
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 26 Feb 2014 22:07:26 +0000 (22:07 +0000)]
Add a limit to the heuristic that register allocates instructions in local order.
This handles pathological cases in which we see 2x increase in spill
code for large blocks (~50k instructions). I don't have a unit test
for this behavior.
Fixes rdar://
16072279.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202304
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 26 Feb 2014 21:51:28 +0000 (21:51 +0000)]
Use an install name dir of @executable_path/../lib instead of @rpath.
Using @executable_path/../lib matches what we have on Makefiles and works
with older versions of OS X too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202302
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Wed, 26 Feb 2014 21:39:12 +0000 (21:39 +0000)]
Lower unsigned vsetcc to psubus in certain cases
The current approach to lower a vsetult is to flip the sign bit of the
operands, swap the operands and then use a (signed) pcmpgt. psubus (unsigned
saturating subtract) can be used to emulate a vsetult more efficiently:
+ case ISD::SETULT: {
+ // If the comparison is against a constant we can turn this into a
+ // setule. With psubus, setule does not require a swap. This is
+ // beneficial because the constant in the register is no longer
+ // destructed as the destination so it can be hoisted out of a loop.
I also enable lowering via psubus in a few other cases where it's clearly
beneficial: setule and setuge if minu/maxu cannot be used.
rdar://problem/
14338765
Patch by Adam Nemet <anemet@apple.com>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202301
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 26 Feb 2014 20:39:28 +0000 (20:39 +0000)]
Don't mix the plain and keyword signatures of target_link_libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202299
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 26 Feb 2014 20:22:20 +0000 (20:22 +0000)]
Silencing an MSVC signed comparison warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202295
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 26 Feb 2014 20:20:30 +0000 (20:20 +0000)]
Fix the aggressive anti-dep breaker's subregister definition handling
The aggressive anti-dependency breaker scans instructions, bottom-up, within the
scheduling region in order to find opportunities where register renaming can
be used to break anti-dependencies.
Unfortunately, the aggressive anti-dep breaker was treating a register definition
as defining all of that register's aliases (including super registers). This behavior
is incorrect when the super register is live and there are other definitions of
subregisters of the super register.
For example, given the following sequence:
%CR2EQ<def> = CROR %CR3UN, %CR3UN<kill>
%CR2GT<def> = IMPLICIT_DEF
%X4<def> = MFOCRF8 %CR2
the analysis of the first subregister definition would work as expected:
Anti: %CR2GT<def> = IMPLICIT_DEF
Def Groups: CR2GT=g194->g0(via CR2)
Antidep reg: CR2GT (zero group)
Use Groups:
but the analysis of the second one would not:
Anti: %CR2EQ<def> = CROR %CR3UN, %CR3UN<kill>
Def Groups: CR2EQ=g195
Antidep reg: CR2EQ
Rename Candidates for Group g195: ...
because, when processing the %CR2GT<def>, we'd mark all super registers of
%CR2GT (%CR2 in this case) as defined. As a result, when processing
%CR2EQ<def>, %CR2 no longer appears to be live, and %CR2EQ<def>'s group is not
%unioned with the %CR2 group.
I don't have an in-tree test case for this yet (and even if I did, I don't have
a small one).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202294
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 26 Feb 2014 19:57:30 +0000 (19:57 +0000)]
GlobalOpt: Apply fastcc to internal x86_thiscallcc functions
We should apply fastcc whenever profitable. We can expand this list,
but there are lots of conventions with performance implications that we
don't want to change.
Differential Revision: http://llvm-reviews.chandlerc.com/D2705
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202293
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Wed, 26 Feb 2014 19:51:44 +0000 (19:51 +0000)]
Relax COFF string table check
COFF object files with 0 as string table size are currently rejected. This
prevents us from reading object files written by tools like cvtres that
violate the PECOFF spec and write 0 instead of 4 for the size of an empty
string table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202292
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Rieck [Wed, 26 Feb 2014 19:51:08 +0000 (19:51 +0000)]
Fix broken FileCheck prefix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202291
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 26 Feb 2014 19:12:28 +0000 (19:12 +0000)]
Use the overloaded std::abs rather than C's abs(int) to address Clang's -Wabsolute-value
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202286
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 26 Feb 2014 17:57:35 +0000 (17:57 +0000)]
Use count 0.
Thanks to Roman Divacky for the suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202283
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 26 Feb 2014 17:05:38 +0000 (17:05 +0000)]
Fix typo. Thanks to Roman Divacky for noticing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202277
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 26 Feb 2014 17:02:08 +0000 (17:02 +0000)]
Compare DataLayout by Value, not by pointer.
This fixes spurious warnings in llvm-link about the datalayout not matching.
Thanks to Zalman Stern for reporting the bug!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202276
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 26 Feb 2014 16:58:35 +0000 (16:58 +0000)]
Use a sorted array to store the information about a few address spaces.
We don't have any test with more than 6 address spaces, so a DenseMap is
probably not the correct answer.
An unsorted array would also be OK, but we have to sort it for printing anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202275
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 26 Feb 2014 16:49:40 +0000 (16:49 +0000)]
Move these functions out of line. A DenseMap lookup is not a simple operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202274
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 26 Feb 2014 16:31:56 +0000 (16:31 +0000)]
Fix PR18165: LSR must avoid scaling factors that exceed the limit on truncated use.
Patch by Michael Zolotukhin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202273
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 26 Feb 2014 13:10:01 +0000 (13:10 +0000)]
llvm-symbolizer: use dynamic symbol table if the regular one is stripped.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202265
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Wed, 26 Feb 2014 12:51:19 +0000 (12:51 +0000)]
Move getELFDynamicSymbolIterators to a public header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202264
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 26 Feb 2014 12:18:55 +0000 (12:18 +0000)]
[CMake] BUILD_SHARED_LIBS: Fixup for r202261: Give PULIC to system_libs in LLVMSupport.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202263
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Wed, 26 Feb 2014 12:06:36 +0000 (12:06 +0000)]
Ensure bitcode encoding of instructions and their operands stays stable.
This includes instructions with aggregate operands (insert/extract), instructions with vector operands (insert/extract/shuffle), binary arithmetic and bitwise instructions, conversion instructions and terminators.
Work was done by lama.saba@intel.com.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202262
91177308-0d34-0410-b5e6-
96231b3b80d8