1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-01 08:23:21 +01:00
Commit Graph

83428 Commits

Author SHA1 Message Date
Kaelyn Uhrain
ce97ce2905 Remove an "else" that snuck in after a "return" ;)
llvm-svn: 158844
2012-06-20 20:38:36 +00:00
Kaelyn Uhrain
4b2667930b Check that a file is not a directory before reading it into a MemoryBuffer.
llvm-svn: 158841
2012-06-20 20:21:33 +00:00
Andrew Trick
8b17d495d7 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.

llvm-svn: 158840
2012-06-20 20:17:20 +00:00
Pete Cooper
b80e2722fa 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
llvm-svn: 158839
2012-06-20 19:35:43 +00:00
Jakob Stoklund Olesen
6d2db5c3d9 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.

llvm-svn: 158831
2012-06-20 18:00:57 +00:00
Nuno Lopes
af699605ac 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.

llvm-svn: 158829
2012-06-20 17:30:51 +00:00
Jakob Stoklund Olesen
b2d8a68462 Delete dead code.
llvm-svn: 158827
2012-06-20 16:38:50 +00:00
Hal Finkel
a94da28a6d Add support for generating reg+reg (indexed) pre-inc loads on PPC.
llvm-svn: 158823
2012-06-20 15:43:03 +00:00
Hal Finkel
f5b3193100 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.

llvm-svn: 158822
2012-06-20 15:42:48 +00:00
Aaron Ballman
004a9029c2 Fixing a compiler warning in MSVC 10.
llvm-svn: 158820
2012-06-20 14:44:44 +00:00
Bill Wendling
a57ab60fdd Sphinxify the SegmentedStack document.
llvm-svn: 158819
2012-06-20 12:05:05 +00:00
Bill Wendling
8e1f27552c Move coding standards reference from development_process.rst to programming.rst.
llvm-svn: 158818
2012-06-20 11:56:24 +00:00
Bill Wendling
31591a087e Unindent list.
llvm-svn: 158817
2012-06-20 11:55:22 +00:00
Bill Wendling
b5642731b1 Un-indent list to remove ugly back-slash.
llvm-svn: 158816
2012-06-20 11:53:08 +00:00
Bill Wendling
877de126ed Fix the formatting a bit.
llvm-svn: 158815
2012-06-20 11:25:11 +00:00
Bill Wendling
58612bba3c Sphinxify the developer policy document.
llvm-svn: 158814
2012-06-20 11:20:07 +00:00
Bill Wendling
431f691da5 Sphinxify the lexicon doc.
llvm-svn: 158813
2012-06-20 10:36:41 +00:00
Bill Wendling
0f4631f7b7 Sphinxify BranchWeightMetadata document.
llvm-svn: 158810
2012-06-20 10:17:46 +00:00
Bill Wendling
7a14ffc3c1 Sphinxify the LTO document.
llvm-svn: 158808
2012-06-20 10:08:02 +00:00
Bill Wendling
514d349e9f Unindent list.
llvm-svn: 158806
2012-06-20 09:50:45 +00:00
Bill Wendling
76888338d4 Sphinxify the AliasAnalysis document.
llvm-svn: 158805
2012-06-20 09:49:57 +00:00
Bill Wendling
f453aab690 Unindent list.
llvm-svn: 158804
2012-06-20 09:49:06 +00:00
Bill Wendling
664b964cd3 Un-indent the list and remove ugly back-slash.
llvm-svn: 158803
2012-06-20 09:48:38 +00:00
Chandler Carruth
6f8cc37074 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. ;]

llvm-svn: 158800
2012-06-20 08:39:33 +00:00
Chandler Carruth
5a4738503f 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.

llvm-svn: 158799
2012-06-20 08:39:30 +00:00
Chandler Carruth
e9172d9bf6 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.

llvm-svn: 158798
2012-06-20 08:39:27 +00:00
Craig Topper
f19d6cef51 Add predicate check around some patterns.
llvm-svn: 158797
2012-06-20 07:30:23 +00:00
Craig Topper
54d8fe551b Add predicate check around some patterns.
llvm-svn: 158795
2012-06-20 07:01:11 +00:00
Craig Topper
d63e429d68 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.
llvm-svn: 158792
2012-06-20 05:39:26 +00:00
Andrew Trick
55aafa3d2e 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.

llvm-svn: 158790
2012-06-20 05:23:33 +00:00
Bill Wendling
dd3b7e1a50 Sphinxify the MakefileGuide document.
llvm-svn: 158789
2012-06-20 04:20:39 +00:00
Francois Pichet
0391a62964 Unbreak the MSVC build: add return to unimplemented functions.
llvm-svn: 158788
2012-06-20 04:08:49 +00:00
Andrew Trick
0db6403960 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.

llvm-svn: 158787
2012-06-20 03:42:09 +00:00
Bill Wendling
88128b9637 Sphinxify the CodingStandard documentation.
llvm-svn: 158786
2012-06-20 02:57:56 +00:00
Nick Kledzik
d4f7f6f97a 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.
llvm-svn: 158770
2012-06-20 00:28:54 +00:00
Kaelyn Uhrain
65bbc30da0 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.

llvm-svn: 158769
2012-06-20 00:16:40 +00:00
Jakob Stoklund Olesen
355b171711 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.

llvm-svn: 158766
2012-06-19 23:50:18 +00:00
Bill Wendling
a1e7e1ee54 Alphabetize.
llvm-svn: 158764
2012-06-19 23:47:58 +00:00
Chad Rosier
670855e41b Tidy up.
llvm-svn: 158762
2012-06-19 23:37:57 +00:00
Chad Rosier
76e60fbe46 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.

llvm-svn: 158758
2012-06-19 22:59:12 +00:00
Lang Hames
f0b9601a6d 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.

llvm-svn: 158757
2012-06-19 22:51:23 +00:00
Jakob Stoklund Olesen
55d7590707 80 col.
llvm-svn: 158755
2012-06-19 22:50:53 +00:00
Chad Rosier
0864fce514 Typo. Patch by Cameron McInally <cameron.mcinally@nyu.edu>.
llvm-svn: 158754
2012-06-19 22:28:18 +00:00
Bill Wendling
ea97fa38ce Add Projects.rst to the toctree.
llvm-svn: 158753
2012-06-19 22:25:41 +00:00
Bill Wendling
c771e334ac Use correct capitalization.
llvm-svn: 158752
2012-06-19 22:25:17 +00:00
Jakob Stoklund Olesen
0a9edb38d3 Add a triple.
The test was failing on Linux because of asm syntax differences.

llvm-svn: 158748
2012-06-19 21:46:25 +00:00
Jakob Stoklund Olesen
66e7517610 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.

llvm-svn: 158743
2012-06-19 21:14:34 +00:00
Jakob Stoklund Olesen
ab5d8af49d Style: Don't reuse variables for multiple purposes.
No functional change.

llvm-svn: 158742
2012-06-19 21:10:18 +00:00
Marshall Clow
51d2b8e1ff New test tool: obj2yaml
llvm-svn: 158730
2012-06-19 18:02:35 +00:00
Bill Wendling
9f7f1bb132 Indent coding examples.
llvm-svn: 158728
2012-06-19 17:48:06 +00:00