1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

83112 Commits

Author SHA1 Message Date
Nuno Lopes
c9edab11db refactor the MemoryBuiltin analysis:
- provide more extensive set of functions to detect library allocation functions (e.g., malloc, calloc, strdup, etc)
 - provide an API to compute the size and offset of an object pointed by

Move a few clients (GVN, AA, instcombine, ...) to the new API.
This implementation is a lot more aggressive than each of the custom implementations being replaced.

Patch reviewed by Nick Lewycky and Chandler Carruth, thanks.

llvm-svn: 158919
2012-06-21 15:45:28 +00:00
Nadav Rotem
313b090606 Add a number of threshold arguments to the SRA pass.
A patch by Tom Stellard with minor changes.

llvm-svn: 158918
2012-06-21 13:44:31 +00:00
NAKAMURA Takumi
ff5fc0d895 Revert r158209, "test/CodeGen/Generic/APIntLoadStore.ll: Mark as XFAIL:ppc since r157911."
It passes according to ppc changes.

llvm-svn: 158917
2012-06-21 13:43:06 +00:00
NAKAMURA Takumi
25b5b67e7f llvm/unittests/ExecutionEngine/JIT/CMakeLists.txt: Unbreak build.
llvm-svn: 158914
2012-06-21 12:44:58 +00:00
Chandler Carruth
e5c8b35fee Add a pragma to supress an MSVC warning on some of the absurd code I'm
using to test the alignment support library.

Patch from Nikola on IRC.

llvm-svn: 158912
2012-06-21 10:02:41 +00:00
Chandler Carruth
0d5765bb26 Add some missing dependencies here that I missed in my first pass
through. Also sort them.

llvm-svn: 158911
2012-06-21 10:02:40 +00:00
Chandler Carruth
f372f64b71 Completely refactor the structuring of unittest CMake files to match the
Makefiles, the CMake files in every other part of the LLVM tree, and
sanity.

This should also restore the output tree structure of all the unit
tests, sorry for breaking that, and thanks for letting me know.

The fundamental change is to put a CMakeLists.txt file in the unittest
directory, with a single test binary produced from it. This has several
advantages:

- No more weird directory stripping in the unittest macro, allowing it
  to be used more readily in other projects.
- No more directory prefixes on all the source files.
- Allows correct and precise use of LLVM's per-directory dependency
  system.
- Allows use of the checking logic for source files that have not been
  added to the CMake build. This uncovered a file being skipped with
  CMake in LLVM and one in Clang's unit tests.
- Makes Specifying conditional compilation or other custom logic for JIT
  tests easier.

It did require adding the concept of an explicit 'optional' source file
to the CMake build so that the missing-file check can skip cases where
the file is *supposed* to be missing. =]

This is another chunk of refactoring the CMake build in order to make it
usable for other clients like CompilerRT / ASan / TSan.

Note that this is interdependent with a Clang CMake change.

llvm-svn: 158909
2012-06-21 09:51:26 +00:00
Nadav Rotem
e1481b910d llvm-stress: Stabalize (by using an ordered container) and add randomness to the order in which loops are generated.
llvm-svn: 158908
2012-06-21 08:58:15 +00:00
Bill Wendling
b856af08dc Cleanup some encoding mishaps.
llvm-svn: 158904
2012-06-21 07:01:02 +00:00
Bill Wendling
f83a5bb8a8 Sphinxify the tablegen document.
llvm-svn: 158903
2012-06-21 06:58:24 +00:00
Lang Hames
662801dbc8 Add a missing llvm.fma -> VFNMS pattern to the ARM backend.
llvm-svn: 158902
2012-06-21 06:10:00 +00:00
Bill Wendling
e9e0fa46e7 Sphinxify the outdated Packaging documentation.
llvm-svn: 158901
2012-06-21 06:09:37 +00:00
Evan Cheng
5e3a175c65 Emit a single _udivmodsi4 libcall instead of two separate _udivsi3 and
_umodsi3 libcalls if they have the same arguments. This optimization
was apparently broken if one of the node was replaced in place.
rdar://11714607

llvm-svn: 158900
2012-06-21 05:56:05 +00:00
Chandler Carruth
99fb206e0c Factor the logic for setting up a GoogleTest unit test executable into
a helper function in CMake. This will allow us to share all of this
logic with Clang, and eventually CompilerRT.

llvm-svn: 158896
2012-06-21 05:16:58 +00:00
Chandler Carruth
3bcf96d48a Simplify the naming pattern in the unittests' CMake file
llvm-svn: 158893
2012-06-21 02:02:48 +00:00
Chandler Carruth
0def3927a9 Remove one of the LLVM-specific CMake hacks in favor of standard CMake
facilities.

This was only used in one place in LLVM, and was used pervasively (but
with different code!) in Clang. It has no advantages over the standard
CMake facilities and in some cases disadvantages.

llvm-svn: 158889
2012-06-21 01:35:09 +00:00
Jakob Stoklund Olesen
d23194c4ed Update regunits in RegisterCoalescer::reMaterializeTrivialDef.
Old code would only update physreg live intervals.

llvm-svn: 158881
2012-06-21 00:09:15 +00:00
Meador Inge
73a66eeb7d Put space after "code-block::".
llvm-svn: 158880
2012-06-20 23:57:00 +00:00
Jakob Stoklund Olesen
ee49ea0940 Remove LiveIntervals::iterator.
Live intervals for regunits and virtual registers are stored separately,
and physreg live intervals are going away.

To visit the live ranges of all virtual registers, use this pattern
instead:

  for (unsigned i = 0, e = MRI->getNumVirtRegs(); i != e; ++i) {
    unsigned Reg = TargetRegisterInfo::index2VirtReg(i);
    if (MRI->reg_nodbg_empty(Reg))
      continue;

llvm-svn: 158879
2012-06-20 23:54:20 +00:00
Jakob Stoklund Olesen
b36c50f5a0 Remove spurious typedefs.
llvm-svn: 158878
2012-06-20 23:54:18 +00:00
Meador Inge
05adf60070 Removed some left over HTML tags and a '}'.
llvm-svn: 158877
2012-06-20 23:48:01 +00:00
Jakob Stoklund Olesen
75fa4ceaa1 Remove the RenderMachineFunction HTML output pass.
I don't think anyone has been using this functionality for a while, and
it is getting in the way of refactoring now.

llvm-svn: 158876
2012-06-20 23:47:58 +00:00
Jakob Stoklund Olesen
914857b29a Remove the -live-regunits command line option.
Register allocators depend on it being permanently enabled now.

llvm-svn: 158873
2012-06-20 23:31:34 +00:00
Jakob Stoklund Olesen
f3deae3d2f Fix some more LiveInterval enumerations.
Deterministically enumerate the virtual registers instead.

llvm-svn: 158872
2012-06-20 23:23:59 +00:00
Jakob Stoklund Olesen
684fbc6e89 Remove LiveIntervalUnions from RegAllocBase.
They are living in LiveRegMatrix now.

llvm-svn: 158868
2012-06-20 22:52:29 +00:00
Jakob Stoklund Olesen
8976daa3cc Convert RAGreedy to LiveRegMatrix interference checking.
Stop depending on the LiveIntervalUnions in RegAllocBase, they are about
to be removed.

The changes are mostly replacing register alias iterators with regunit
iterators, and querying LiveRegMatrix instrad of RegAllocBase.

InterferenceCache is converted to work with per-regunit
LiveIntervalUnions, and it checks fixed regunit interference separately,
using the fixed live intervals provided by LiveIntervalAnalysis.

The local splitting helper calcGapWeights() is also considering fixed
regunit interference which is kept on the side now.

llvm-svn: 158867
2012-06-20 22:52:26 +00:00
Jakob Stoklund Olesen
da4453ee18 Convert RABasic to using LiveRegMatrix interference checking.
Stop using the LiveIntervalUnions provided by RegAllocBase, they will be
removed soon.

llvm-svn: 158866
2012-06-20 22:52:24 +00:00
Jakob Stoklund Olesen
6bd9aa4463 Enable register unit liveness by default.
Soon we won't need to compute live intervals for physical registers.

llvm-svn: 158865
2012-06-20 22:52:22 +00:00
Jakob Stoklund Olesen
16f1cc3014 Teach PBQPBuilder::build() about regunit interference.
Filter out physreg candidates with regunit interferrence.
Also compute regmask interference more efficiently.

llvm-svn: 158864
2012-06-20 22:32:05 +00:00
Andrew Trick
33bf2f7893 Restructure PopulateLoopsDFS::insertIntoLoop.
As Nadav pointed out the first implementation was obscure.

llvm-svn: 158862
2012-06-20 22:18:33 +00:00
Bill Wendling
d36ed2f9ba Sphixify the GEP FAQ.
llvm-svn: 158858
2012-06-20 21:54:22 +00:00
Jakob Stoklund Olesen
dc9130eb99 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.

llvm-svn: 158856
2012-06-20 21:25:05 +00:00
Akira Hatanaka
9a6df0f613 Revert r158846.
llvm-svn: 158855
2012-06-20 21:19:39 +00:00
Akira Hatanaka
f8ce377e38 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. 

llvm-svn: 158846
2012-06-20 20:39:23 +00:00
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