Jakob Stoklund Olesen [Wed, 20 Jun 2012 22:32:05 +0000 (22:32 +0000)]
Teach PBQPBuilder::build() about regunit interference.
Filter out physreg candidates with regunit interferrence.
Also compute regmask interference more efficiently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158864
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 20 Jun 2012 22:18:33 +0000 (22:18 +0000)]
Restructure PopulateLoopsDFS::insertIntoLoop.
As Nadav pointed out the first implementation was obscure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158862
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Jun 2012 21:54:22 +0000 (21:54 +0000)]
Sphixify the GEP FAQ.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158858
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 20 Jun 2012 21:25:05 +0000 (21:25 +0000)]
Avoid iterating with LiveIntervals::iterator.
That is a DenseMap iterator keyed by pointers, so the iteration order is
nondeterministic.
I would like to replace the DenseMap with an IndexedMap which doesn't
allow iteration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158856
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 20 Jun 2012 21:19:39 +0000 (21:19 +0000)]
Revert r158846.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158855
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 20 Jun 2012 20:39:23 +0000 (20:39 +0000)]
In MipsDisassembler.cpp, instead of defining register class tables, use the ones
that are generated by TableGen and are already available in
MipsGenRegisterInfo.inc. Suggested by Jakob Stoklund Olesen.
Also, fix bug in function DecodeAFGR64RegisterClass.
Patch by Vladimir Medic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158846
91177308-0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Wed, 20 Jun 2012 20:38:36 +0000 (20:38 +0000)]
Remove an "else" that snuck in after a "return" ;)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158844
91177308-0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Wed, 20 Jun 2012 20:21:33 +0000 (20:21 +0000)]
Check that a file is not a directory before reading it into a MemoryBuffer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158841
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 20 Jun 2012 20:17:20 +0000 (20:17 +0000)]
Add "extern template" declarations now that we use explicit instantiation.
This is supported by gcc and clang, but guarded by a macro for MSVC 2008.
The extern template declaration is not necessary but generally good
form. It can avoid extra instantiations of the template methods
defined inline.
The EXTERN_TEMPLATE_INSTANTIATION macro could probably be generalized to
handle multiple template parameters if someone thinks it's worthwhile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158840
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 20 Jun 2012 19:35:43 +0000 (19:35 +0000)]
Add users of a MERGE_VALUE node to the worklist to process again when the node is removed. Sorry, no test case. Foudn it by inspection of the code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158839
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 20 Jun 2012 18:00:57 +0000 (18:00 +0000)]
Only update regunit live ranges that have been precomputed.
Regunit live ranges are computed on demand, so when mi-sched calls
handleMove, some regunits may not have live ranges yet.
That makes updating them easier: Just skip the non-existing ranges. They
will be computed correctly from the rescheduled machine code when they
are needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158831
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 20 Jun 2012 17:30:51 +0000 (17:30 +0000)]
replace usage of EmitGEPOffset() with TargetData::getIndexedOffset() when the GEP offset is known to be constant.
With this change, we avoid relying on the IR Builder to constant fold the operations.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158829
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 20 Jun 2012 16:38:50 +0000 (16:38 +0000)]
Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158827
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 20 Jun 2012 15:43:03 +0000 (15:43 +0000)]
Add support for generating reg+reg (indexed) pre-inc loads on PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158823
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 20 Jun 2012 15:42:48 +0000 (15:42 +0000)]
Fix DAGCombine to deal with ext-conversion of pre/post_inc loads.
The test case for this will come with the PPC indexed preinc loads commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158822
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Wed, 20 Jun 2012 14:44:44 +0000 (14:44 +0000)]
Fixing a compiler warning in MSVC 10.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158820
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Jun 2012 12:05:05 +0000 (12:05 +0000)]
Sphinxify the SegmentedStack document.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158819
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Jun 2012 11:56:24 +0000 (11:56 +0000)]
Move coding standards reference from development_process.rst to programming.rst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158818
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Jun 2012 11:55:22 +0000 (11:55 +0000)]
Unindent list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158817
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Jun 2012 11:53:08 +0000 (11:53 +0000)]
Un-indent list to remove ugly back-slash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158816
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Jun 2012 11:25:11 +0000 (11:25 +0000)]
Fix the formatting a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158815
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Jun 2012 11:20:07 +0000 (11:20 +0000)]
Sphinxify the developer policy document.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158814
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Jun 2012 10:36:41 +0000 (10:36 +0000)]
Sphinxify the lexicon doc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158813
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Jun 2012 10:17:46 +0000 (10:17 +0000)]
Sphinxify BranchWeightMetadata document.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158810
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Jun 2012 10:08:02 +0000 (10:08 +0000)]
Sphinxify the LTO document.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158808
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Jun 2012 09:50:45 +0000 (09:50 +0000)]
Unindent list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158806
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Jun 2012 09:49:57 +0000 (09:49 +0000)]
Sphinxify the AliasAnalysis document.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158805
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Jun 2012 09:49:06 +0000 (09:49 +0000)]
Unindent list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158804
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Jun 2012 09:48:38 +0000 (09:48 +0000)]
Un-indent the list and remove ugly back-slash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158803
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 20 Jun 2012 08:39:33 +0000 (08:39 +0000)]
Remove 'static' from inline functions defined in header files.
There is a pretty staggering amount of this in LLVM's header files, this
is not all of the instances I'm afraid. These include all of the
functions that (in my build) are used by a non-static inline (or
external) function. Specifically, these issues were caught by the new
'-Winternal-linkage-in-inline' warning.
I'll try to just clean up the remainder of the clearly redundant "static
inline" cases on functions (not methods!) defined within headers if
I can do so in a reliable way.
There were even several cases of a missing 'inline' altogether, or my
personal favorite "static bool inline". Go figure. ;]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158800
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 20 Jun 2012 08:39:30 +0000 (08:39 +0000)]
Fix two rather subtle internal vs. external linker issues.
I'll admit I'm not entirely satisfied with this change, but it seemed
the cleanest option. Other suggestions quite welcome
The issue is that the traits specializations have static methods which
return the typedef'ed PHI_iterator type. In both the IR and MI layers
this is typedef'ed to a custom iterator class defined in an anonymous
namespace giving the types and the functions returning them internal
linkage. However, because the traits specialization is defined in the
'llvm' namespace (where it has to be, specialized template lives there),
and is in turn used in the templated implementation of the SSAUpdater.
This led to the linkage conflict that Clang now warns about.
The simplest solution to me was just to define the PHI_iterator as
a nested class inside the trait specialization. That way it still
doesn't get scoped widely, it can't be accidentally reused somewhere,
etc. This is a little gross just because nested class definitions are
a little gross, but the alternatives seem more ad-hoc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158799
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 20 Jun 2012 08:39:27 +0000 (08:39 +0000)]
Fix inappropriate use of anonymous namespaces in unittests.
The TEST_F macros actually declare *subclasses* of the test fixtures.
Even if they didn't we don't want them to declare external functions.
The entire unit test, including both the fixture class and the fixture
test cases should be wrapped in the anonymous namespace.
This issue was caught by the new '-Winternal-linkage-in-inline' warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158798
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Jun 2012 07:30:23 +0000 (07:30 +0000)]
Add predicate check around some patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158797
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Jun 2012 07:01:11 +0000 (07:01 +0000)]
Add predicate check around some patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158795
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 20 Jun 2012 05:39:26 +0000 (05:39 +0000)]
Don't insert 128-bit UNDEF into 256-bit vectors. Just keep the 256-bit vector. Original patch by Elena Demikhovsky. Tweaked by me to allow possibility of covering more cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158792
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 20 Jun 2012 05:23:33 +0000 (05:23 +0000)]
A new algorithm for computing LoopInfo. Temporarily disabled.
-stable-loops enables a new algorithm for generating the Loop
forest. It differs from the original algorithm in a few respects:
- Not determined by use-list order.
- Initially guarantees RPO order of block and subloops.
- Linear in the number of CFG edges.
- Nonrecursive.
I didn't want to change the LoopInfo API yet, so the block lists are
still inclusive. This seems strange to me, and it means that building
LoopInfo is not strictly linear, but it may not be a problem in
practice. At least the block lists start out in RPO order now. In the
future we may add an attribute or wrapper analysis that allows other
passes to assume RPO order.
The primary motivation of this work was not to optimize LoopInfo, but
to allow reproducing performance issues by decomposing the compilation
stages. I'm often unable to do this with the current LoopInfo, because
the loop tree order determines Loop pass order. Serializing the IR
tends to invert the order, which reverses the optimization order. This
makes it nearly impossible to debug interdependent loop optimizations
such as LSR.
I also believe this will provide more stable performance results across time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158790
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Jun 2012 04:20:39 +0000 (04:20 +0000)]
Sphinxify the MakefileGuide document.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158789
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Wed, 20 Jun 2012 04:08:49 +0000 (04:08 +0000)]
Unbreak the MSVC build: add return to unimplemented functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158788
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 20 Jun 2012 03:42:09 +0000 (03:42 +0000)]
Move the implementation of LoopInfo into LoopInfoImpl.h.
The implementation only needs inclusion from LoopInfo.cpp and
MachineLoopInfo.cpp. Clients of the interface should only include the
interface. This makes the interface readable and speeds up rebuilds
after modifying the implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158787
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Jun 2012 02:57:56 +0000 (02:57 +0000)]
Sphinxify the CodingStandard documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158786
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Kledzik [Wed, 20 Jun 2012 00:28:54 +0000 (00:28 +0000)]
Add permissions(), map_file_pages(), and unmap_file_pages() to llvm::sys::fs and add unit test. Unix is implemented. Windows side needs to be implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158770
91177308-0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Wed, 20 Jun 2012 00:16:40 +0000 (00:16 +0000)]
Don't assert when given an empty range.
llvm::RawMemoryObject handles empty ranges just fine, and the assert can
be triggered in the wild by e.g. invoking clang with a file that
included an empty pre-compiled header file when clang has been built
with assertions enabled. Without assertions enabled, clang will properly
report that the empty file is not a valid PCH.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158769
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 19 Jun 2012 23:50:18 +0000 (23:50 +0000)]
Add regunit liveness support to LiveIntervals::handleMove().
When LiveIntervals is tracking fixed interference in regunits, make sure
to update those intervals as well. Currently guarded by -live-regunits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158766
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 19 Jun 2012 23:47:58 +0000 (23:47 +0000)]
Alphabetize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158764
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 19 Jun 2012 23:37:57 +0000 (23:37 +0000)]
Tidy up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158762
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 19 Jun 2012 22:59:12 +0000 (22:59 +0000)]
Add an ensureMaxAlignment() function to MachineFrameInfo (analogous to
ensureAlignment() in MachineFunction). Also, drop setMaxAlignment() in
favor of this new function. This creates a main entry point to setting
MaxAlignment, which will be helpful for future work. No functionality
change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158758
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 19 Jun 2012 22:51:23 +0000 (22:51 +0000)]
Add DAG-combines for aggressive FMA formation.
This patch adds DAG combines to form FMAs from pairs of FADD + FMUL or
FSUB + FMUL. The combines are performed when:
(a) Either
AllowExcessFPPrecision option (-enable-excess-fp-precision for llc)
OR
UnsafeFPMath option (-enable-unsafe-fp-math)
are set, and
(b) TargetLoweringInfo::isFMAFasterThanMulAndAdd(VT) is true for the type of
the FADD/FSUB, and
(c) The FMUL only has one user (the FADD/FSUB).
If your target has fast FMA instructions you can make use of these combines by
overriding TargetLoweringInfo::isFMAFasterThanMulAndAdd(VT) to return true for
types supported by your FMA instruction, and adding patterns to match ISD::FMA
to your FMA instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158757
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 19 Jun 2012 22:50:53 +0000 (22:50 +0000)]
80 col.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158755
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 19 Jun 2012 22:28:18 +0000 (22:28 +0000)]
Typo. Patch by Cameron McInally <cameron.mcinally@nyu.edu>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158754
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 19 Jun 2012 22:25:41 +0000 (22:25 +0000)]
Add Projects.rst to the toctree.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158753
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 19 Jun 2012 22:25:17 +0000 (22:25 +0000)]
Use correct capitalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158752
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 19 Jun 2012 21:46:25 +0000 (21:46 +0000)]
Add a triple.
The test was failing on Linux because of asm syntax differences.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158748
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 19 Jun 2012 21:14:34 +0000 (21:14 +0000)]
Implement PPCInstrInfo::isCoalescableExtInstr().
The PPC::EXTSW instruction preserves the low 32 bits of its input, just
like some of the x86 instructions. Use it to reduce register pressure
when the low 32 bits have multiple uses.
This requires a small change to PeepholeOptimizer since EXTSW takes a
64-bit input register.
This is related to PR5997.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158743
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 19 Jun 2012 21:10:18 +0000 (21:10 +0000)]
Style: Don't reuse variables for multiple purposes.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158742
91177308-0d34-0410-b5e6-
96231b3b80d8
Marshall Clow [Tue, 19 Jun 2012 18:02:35 +0000 (18:02 +0000)]
New test tool: obj2yaml
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158730
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 19 Jun 2012 17:48:06 +0000 (17:48 +0000)]
Indent coding examples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158728
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 19 Jun 2012 17:43:57 +0000 (17:43 +0000)]
Remove bad HTML tags. Add missing :.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158726
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 19 Jun 2012 17:40:35 +0000 (17:40 +0000)]
Fix PR13148, an inf-loop in StringMap.
StringMap suffered from the same bug as DenseMap: when you explicitly
construct it with a small number of buckets, you can arrange for the
tombstone-based growth path to be followed when the number of buckets
was less than '8'. In that case, even with a full map, it would compare
'0' as not less than '0', and refuse to grow the table, leading to
inf-loops trying to find an empty bucket on the next insertion. The fix
is very simple: use '<=' as the comparison. The same fix was applied to
DenseMap as well during its recent refactoring.
Thanks to Alex Bolz for the great report and test case. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158725
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 19 Jun 2012 17:40:29 +0000 (17:40 +0000)]
Remove some superfluous SCOPED_TRACEs from this unit test.
GoogleTest already prints errors with all the information about which
test case contained the error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158724
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 19 Jun 2012 17:04:16 +0000 (17:04 +0000)]
Emit TableGen's header comment with C-style comments, so it can be used from C89 code.
Should silence warnings when compiling the X86 disassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158723
91177308-0d34-0410-b5e6-
96231b3b80d8
Jan Wen Voung [Tue, 19 Jun 2012 16:03:02 +0000 (16:03 +0000)]
Have ARM ELF use correct reloc for "b" instr.
The condition code didn't actually matter for arm "b" instructions,
unlike "bl". It should just use the R_ARM_JUMP24 reloc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158722
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 19 Jun 2012 13:57:17 +0000 (13:57 +0000)]
Mark most PPC register classes to avoid write-after-write.
For processors with the G5-like instruction-grouping scheme, this helps avoid
early group termination due to a write-after-write dependency within the group.
It should also help on pipelined embedded cores.
On POWER7, over the test suite, this gives an average 0.5% speedup. The largest
speedups are:
SingleSource/Benchmarks/Stanford/Quicksort - 33%
MultiSource/Applications/d/make_dparser - 21%
MultiSource/Benchmarks/FreeBench/analyzer/analyzer - 12%
MultiSource/Benchmarks/MiBench/telecomm-FFT/telecomm-fft - 12%
Largest slowdowns:
SingleSource/Benchmarks/Stanford/Bubblesort - 23%
MultiSource/Benchmarks/Prolangs-C++/city/city - 21%
MultiSource/Benchmarks/BitBench/uuencode/uuencode - 16%
MultiSource/Benchmarks/mediabench/mpeg2/mpeg2dec/mpeg2decode - 13%
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158719
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Tue, 19 Jun 2012 13:52:33 +0000 (13:52 +0000)]
Updating the credits after r158717
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158718
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 19 Jun 2012 09:29:05 +0000 (09:29 +0000)]
Put flag names on one line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158715
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 19 Jun 2012 09:27:54 +0000 (09:27 +0000)]
Fix italicized text.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158714
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 19 Jun 2012 09:26:15 +0000 (09:26 +0000)]
Use correct URL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158713
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 19 Jun 2012 09:25:04 +0000 (09:25 +0000)]
Fix numbering of list items.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158712
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 19 Jun 2012 09:23:23 +0000 (09:23 +0000)]
Fix some Sphinx mistakes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158711
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 19 Jun 2012 09:18:34 +0000 (09:18 +0000)]
First attempt at Sphinx. Convert the Projects.html file to Sphinx format.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158709
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 19 Jun 2012 05:29:57 +0000 (05:29 +0000)]
[Support/PathV2] Fix out of bounds access in identify_magic when the file is empty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158704
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 19 Jun 2012 03:45:29 +0000 (03:45 +0000)]
Make MipsLongBranch::runOnMachineFunction return true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158702
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 19 Jun 2012 03:39:45 +0000 (03:39 +0000)]
Use MachineBasicBlock::instr_iterator instead of MachineBasicBlock::iterator in
MipsCodeEmitter.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158701
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 19 Jun 2012 02:34:32 +0000 (02:34 +0000)]
Add support for generating reg+reg preinc stores on PPC.
PPC will now generate STWUX and friends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158698
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 19 Jun 2012 02:17:35 +0000 (02:17 +0000)]
really add a triple :-(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158696
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 19 Jun 2012 01:42:34 +0000 (01:42 +0000)]
Add a triple to the test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158695
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 19 Jun 2012 00:48:28 +0000 (00:48 +0000)]
Move the support for using .init_array from ARM to the generic
TargetLoweringObjectFileELF. Use this to support it on X86. Unlike ARM,
on X86 it is not easy to find out if .init_array should be used or not, so
the decision is made via TargetOptions and defaults to off.
Add a command line option to llc that enables it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158692
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 18 Jun 2012 23:34:26 +0000 (23:34 +0000)]
revert r158660, since Chris has some issues with this patch (namely using code to reprent information only used by the compiler)
Original commit msg:
add the 'alloc' metadata node to represent the size of offset of buffers pointed to by pointers.
This metadata can be attached to any instruction returning a pointer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158688
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 18 Jun 2012 22:31:28 +0000 (22:31 +0000)]
Don't copy a potentially-uninitialized variable.
Based on review discussion of r158638 with Chandler Carruth, Tobias von Koch, and Duncan Sands and a -Wmaybe-uninitialized warning from GCC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158685
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 18 Jun 2012 22:23:48 +0000 (22:23 +0000)]
ARM: use NOEN loads and stores if possible when handling struct byval.
This change is to be enabled in clang.
rdar://
9877866
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158684
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Mon, 18 Jun 2012 21:08:18 +0000 (21:08 +0000)]
Allow up to 64 functional units per processor itinerary.
This patch changes the type used to hold the FU bitset from unsigned to uint64_t.
This will be needed for some upcoming PowerPC itineraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158679
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 18 Jun 2012 20:21:38 +0000 (20:21 +0000)]
[docs] Port FAQ over to Sphinx.
Patch by Mikael Lyngvig!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158677
91177308-0d34-0410-b5e6-
96231b3b80d8
Marshall Clow [Mon, 18 Jun 2012 19:47:16 +0000 (19:47 +0000)]
Added accessors for getting coff_relocation info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158675
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 18 Jun 2012 19:45:50 +0000 (19:45 +0000)]
ARM: Define generic HINT instruction.
The NOP, WFE, WFI, SEV and YIELD instructions are all hints w/
a different immediate value in bits [7,0]. Define a generic HINT
instruction and refactor NOP, WFI, WFI, SEV and YIELD to be
assembly aliases of that.
rdar://
11600518
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158674
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 18 Jun 2012 19:45:46 +0000 (19:45 +0000)]
TableGen: AsmMatcher missing-features list minimization.
When returning a 'cannot match due to missing CPU features' error code,
if there are multiple potential matches with different feature sets,
return the smallest set of missing features from the alternatives as
that's most likely to be the one that's desired.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158673
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Mon, 18 Jun 2012 19:06:25 +0000 (19:06 +0000)]
Add mipsel-* to the list of targets recognized by configure script.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158670
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 18 Jun 2012 16:04:04 +0000 (16:04 +0000)]
add the 'alloc' metadata node to represent the size of offset of buffers pointed to by pointers.
This metadata can be attached to any instruction returning a pointer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158660
91177308-0d34-0410-b5e6-
96231b3b80d8
Joel Jones [Mon, 18 Jun 2012 14:51:32 +0000 (14:51 +0000)]
This change handles a another case for generating the bic instruction
when a compile time constant is known. This occurs when implicitly zero
extending function arguments from 16 bits to 32 bits. The 8 bit case doesn't
need to be handled, as the 8 bit constants are encoded directly, thereby
not needing a separate load instruction to form the constant into a register.
<rdar://problem/
11481151>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158659
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 18 Jun 2012 09:15:04 +0000 (09:15 +0000)]
Add a regression test for the bug exposed by r158087, which has been
temporarily reverted.
This test is annoyingly overspecified, but I don't know of another way
to thoroughly test the saving and restoring of the registers. While this
will have to be adjusted even with the issue fixed in order to re-apply
r158087, those adjustments should very clearly indicate that it is still
correct (%esp getting restored prior to pops), whereas without it, this
case can easily slip under the radar.
Still, any suggestions for improvements are very welcome.
All credit to Matt Beaumont-Gay for reducing this out of an insane
Address Sanitizer crash to a reasonably small seg-faulting C program
when built with -mstackrealign. I just reduced it to IR, which was much
simpler. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158656
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 18 Jun 2012 07:03:12 +0000 (07:03 +0000)]
Temporarily revert r158087.
This patch causes problems when both dynamic stack realignment and
dynamic allocas combine in the same function. With this patch, we no
longer build the epilog correctly, and silently restore registers from
the wrong position in the stack.
Thanks to Matt for tracking this down, and getting at least an initial
test case to Chad. I'm going to try to check a variation of that test
case in so we can easily track the fixes required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158654
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sun, 17 Jun 2012 15:41:56 +0000 (15:41 +0000)]
TableGen.cmake: Fix to work without LLVM_COMMON_DEPENDS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158650
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 17 Jun 2012 14:53:53 +0000 (14:53 +0000)]
For reasons I can't fathom MSVC supports ULL but not LLU suffixes on long long integer literals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158648
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 17 Jun 2012 14:42:49 +0000 (14:42 +0000)]
Add missing unittest files to the cmake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158647
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 17 Jun 2012 12:46:18 +0000 (12:46 +0000)]
Remove SmallMap unittests, unbreaking the build.
I don't know how useful these are for SmallDenseMap, I'll leave that decision to Chandler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158646
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 17 Jun 2012 12:46:13 +0000 (12:46 +0000)]
Bring the return value of SmallVector::insert in line with std::vector::insert.
It always returns the iterator for the first inserted element, or the passed in
iterator if the inserted range was empty. Flesh out the unit test more and fix
all the cases it uncovered so far.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158645
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 17 Jun 2012 12:07:42 +0000 (12:07 +0000)]
Remove SmallMap, and the several files that were used to implement it.
We have SmallDenseMap now that has more correct and predictable
semantics, even though it is a more narrow abstraction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158644
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 17 Jun 2012 11:52:22 +0000 (11:52 +0000)]
SmallVector: return a valid iterator for the rare case of inserting an empty range into a SmallVector.
Patch by Johannes Schaub!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158643
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 17 Jun 2012 11:28:13 +0000 (11:28 +0000)]
Add a unit test for 'swap', and fix a pile of bugs in
SmallDenseMap::swap.
First, make it parse cleanly. Yay for uninstantiated methods.
Second, make the inline-buckets case work correctly. This is way
trickier than it should be due to the uninitialized values in empty and
tombstone buckets.
Finally fix a few typos that caused construction/destruction mismatches
in the counting unittest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158641
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 17 Jun 2012 10:36:49 +0000 (10:36 +0000)]
Disable a particular assertion on MSVC... I'm deeply disturbed by its
implementation of the class layout for the V8 type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158640
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 17 Jun 2012 10:33:51 +0000 (10:33 +0000)]
Add tests for *DenesMap for both key and value types' construction and
destruction and fix a bug in SmallDenseMap they caught.
This is kind of a poor-man's version of the testing that just adds the
addresses to a set on construction and removes them on destruction. We
check that double construction and double destruction don't occur.
Amusingly enough, this is enough to catch a lot of SmallDenseMap issues
because we spend a lot of time with fixed stable addresses in the inline
buffer.
The SmallDenseMap bug fix included makes grow() not double-destroy in
some cases. It also fixes a FIXME there, the code was pretty crappy. We
now don't have any wasted initialization, but we do move the entries in
inline bucket array an extra time. It's probably a better tradeoff, and
is much easier to get correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158639
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 17 Jun 2012 09:05:09 +0000 (09:05 +0000)]
Introduce a SmallDenseMap container that re-uses the existing DenseMap
implementation.
This type includes an inline bucket array which is used initially. Once
it is exceeded, an array of 64 buckets is allocated on the heap. The
bucket count grows from there as needed. Some highlights of this
implementation:
- The inline buffer is very carefully aligned, and so supports types
with alignment constraints.
- It works hard to avoid aliasing issues.
- Supports types with non-trivial constructors, destructors, copy
constructions, etc. It works reasonably hard to minimize copies and
unnecessary initialization. The most common initialization is to set
keys to the empty key, and so that should be fast if at all possible.
This class has a performance / space trade-off. It tries to optimize for
relatively small maps, and so packs the inline bucket array densely into
the object. It will be marginally slower than a normal DenseMap in a few
use patterns, so it isn't appropriate everywhere.
The unit tests for DenseMap have been generalized a bit to support
running over different map implementations in addition to different
key/value types. They've then been automatically extended to cover the
new container through the magic of GoogleTest's typed tests.
All of this is still a bit rough though. I'm going to be cleaning up
some aspects of the implementation, documenting things better, and
adding tests which include non-trivial types. As soon as I'm comfortable
with the correctness, I plan to switch existing users of SmallMap over
to this class as it is already more correct w.r.t. construction and
destruction of objects iin the map.
Thanks to Benjamin Kramer for all the reviews of this and the lead-up
patches. That said, more review on this would really be appreciated. As
I've noted a few times, I'm quite surprised how hard it is to get the
semantics for a hashtable-based map container with a small buffer
optimization correct. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158638
91177308-0d34-0410-b5e6-
96231b3b80d8