1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

40205 Commits

Author SHA1 Message Date
Dan Gohman
e191a19b69 Fix (at least) quadratic worst-case complexity in DominanceFrontier::splitBlock:
don't visit all blocks in the function, and don't iterate over the split blocks'
predecessor lists for each block visited.

Also, remove the special-case test for the entry block. Splitting the entry
block isn't common enough to make this worthwhile.

This fixes a major compile-time bottleneck which is exposed now that
LoopSimplify isn't being redundantly run both before and after
DominanceFrontier.

llvm-svn: 109408
2010-07-26 17:55:15 +00:00
Dan Gohman
c90f474e23 Avoid copying and recopying a std::set.
llvm-svn: 109405
2010-07-26 17:45:33 +00:00
Dan Gohman
8babd895c7 Exit a search loop when the search goal is found.
llvm-svn: 109404
2010-07-26 17:41:45 +00:00
Dan Gohman
014eec6389 Fix formatting.
llvm-svn: 109403
2010-07-26 17:39:33 +00:00
Dan Gohman
8f7e88352a A block dominates itself, by definition.
llvm-svn: 109402
2010-07-26 17:38:15 +00:00
Dan Gohman
32010a6c96 Use DominatorTree::properlyDominates instead of dominates with an
explicit inequality check.

llvm-svn: 109401
2010-07-26 17:37:36 +00:00
Dan Gohman
bed2730c5b A block dominates itself, by definition.
llvm-svn: 109400
2010-07-26 17:35:32 +00:00
Dan Gohman
0627594a67 Use DominatorTree::properlyDominates instead of dominates with an
explicit inequality check.

llvm-svn: 109398
2010-07-26 17:34:05 +00:00
Duncan Sands
0f0329ea35 Pacify gcc-4.5 which wrongly thinks that RExcess (passed as the Excess parameter)
may be used uninitialized in the callers of HighRegPressure.

llvm-svn: 109393
2010-07-26 07:54:17 +00:00
Douglas Gregor
8f3e666150 Fix format-specifier warning
llvm-svn: 109391
2010-07-26 03:55:44 +00:00
Michael J. Spencer
d061ee82ad MC: Fix whitespace error from last commit.
A Visual C++ extension that removes trailing new lines? Seriously?

llvm-svn: 109390
2010-07-26 03:01:28 +00:00
Michael J. Spencer
9d96c92bde MC: Add WinCOFFObjectWriter implementation.
Origonal Windows COFF implementation by Nathan Jedffords.

llvm-svn: 109389
2010-07-26 02:17:32 +00:00
Lang Hames
998b522009 Factored out a bit of common code to mark VNInfos for deletion.
llvm-svn: 109388
2010-07-26 01:49:41 +00:00
Benjamin Kramer
0f8f1bd5a1 Reduce string trashing.
llvm-svn: 109386
2010-07-25 23:18:32 +00:00
Evan Cheng
94e820829a Add comments.
llvm-svn: 109383
2010-07-25 18:59:43 +00:00
Douglas Gregor
caa8768635 Remove extraneous semicolon
llvm-svn: 109373
2010-07-25 17:34:42 +00:00
Douglas Gregor
dc72ace097 Unbreak CMake build
llvm-svn: 109372
2010-07-25 17:10:14 +00:00
Bob Wilson
4f9b0d9fad Fix crashes when scheduling a CopyToReg node -- getMachineOpcode asserts on
those.  Radar 8231572.

llvm-svn: 109367
2010-07-25 05:34:27 +00:00
Eli Friedman
07a7e448b3 Revert r109361; it's impossible to write a call with an argument with an
invalid type.

llvm-svn: 109365
2010-07-24 23:06:59 +00:00
Eli Friedman
cd361b852b Minor simplification.
llvm-svn: 109362
2010-07-24 23:00:59 +00:00
Eli Friedman
124f0f9120 Make the ll parser check that arguments have valid types.
llvm-svn: 109361
2010-07-24 23:00:26 +00:00
Eli Friedman
6769a5186d PR7704: A function is not allowed to return a function; make sure to enforce
this consistently.

llvm-svn: 109360
2010-07-24 22:58:04 +00:00
Anton Korobeynikov
7ae895e007 Hook in GlobalMerge pass
llvm-svn: 109359
2010-07-24 21:52:08 +00:00
Nick Lewycky
8cbc57da86 Revert this because we can't clone cyclic MDNodes which are creating during a
build of llvm-gcc.

llvm-svn: 109355
2010-07-24 20:54:02 +00:00
Anton Korobeynikov
2a0715eb1b Add hook to insert late LLVM=>LLVM passes just before isel
llvm-svn: 109354
2010-07-24 20:48:54 +00:00
Nick Lewycky
7094bd27bc Whether function-local or not, a MDNode may reference a Function in which case
it needs to be mapped to refer to the function in the new module, not the old
one. Fixes PR7700.

llvm-svn: 109353
2010-07-24 19:43:25 +00:00
Duncan Sands
5128cb3743 Clarify that if a new value handle is added while dropping value handles
hanging off a value, then the dropping code will intentionally not drop
it too (since this is almost certainly a bug).

llvm-svn: 109337
2010-07-24 12:09:22 +00:00
Bob Wilson
59114a12b8 Change ScheduleDAGInstrs::Defs and ::Uses to be variable-size vectors
instead of fixed size arrays, so that increasing FirstVirtualRegister to 16K
won't cause a compile time performance regression.

llvm-svn: 109330
2010-07-24 06:01:53 +00:00
Devang Patel
df9f5bf991 Use current working directory when Dirname is empty. This only happens when absolute source file path is used on compiler command line.
llvm-svn: 109302
2010-07-24 00:53:22 +00:00
Evan Cheng
a0b74d8804 Add an ILP scheduler. This is a register pressure aware scheduler that's
appropriate for targets without detailed instruction iterineries.
The scheduler schedules for increased instruction level parallelism in
low register pressure situation; it schedules to reduce register pressure
when the register pressure becomes high.

On x86_64, this is a win for all tests in CFP2000. It also sped up 256.bzip2
by 16%.

llvm-svn: 109300
2010-07-24 00:39:05 +00:00
Bruno Cardoso Lopes
632295a03c Support x86 "eiz" and "riz" pseudo index registers in the assembler.
llvm-svn: 109295
2010-07-24 00:06:39 +00:00
Jim Grosbach
4b7545413d Use the appropriate register class for an i32 when adding ARM::LR to the
function live in set. This will give us tGPR for Thumb1 and GPR otherwise,
so the copy will be spillable. rdar://8224931

llvm-svn: 109293
2010-07-23 23:50:35 +00:00
Jim Grosbach
30d0fca117 Remove too-strict assertion. We may want the vreg copy of the physical register
to be of a different register class. For example, in Thumb1 if the live-in is
a high register, we want the vreg to be a low register. rdar://8224931

llvm-svn: 109291
2010-07-23 23:48:02 +00:00
Devang Patel
7049c83125 Revert r109262.
llvm-svn: 109285
2010-07-23 23:04:41 +00:00
Dale Johannesen
50d2bc2942 Revert 109076. It is wrong and was causing regressions. Add some
comments explaining why it was wrong.  8225024.

Fix the real problem in 8213383: the code that splits very large
blocks when no other place to put constants can be found was not
considering the case that the block contained a Thumb tablejump.

llvm-svn: 109282
2010-07-23 22:50:23 +00:00
Evan Cheng
f215e55d5f - Allow target to specify when is register pressure "too high". In most cases,
it's too late to start backing off aggressive latency scheduling when most
  of the registers are in use so the threshold should be a bit tighter.
- Correctly handle live out's and extract_subreg etc.
- Enable register pressure aware scheduling by default for hybrid scheduler.
  For ARM, this is almost always a win on # of instructions. It's runtime
  neutral for most of the tests. But for some kernels with high register
  pressure it can be a huge win. e.g. 464.h264ref reduced number of spills by
  54 and sped up by 20%.

llvm-svn: 109279
2010-07-23 22:39:59 +00:00
Bruno Cardoso Lopes
06fcdd6563 Remove trailing whitespace
llvm-svn: 109276
2010-07-23 22:15:26 +00:00
Dan Gohman
e6e38c1685 Eliminate getCanonicalInductionVariableIncrement's last user and
eliminate it.

llvm-svn: 109270
2010-07-23 21:34:51 +00:00
Dan Gohman
1d19d69faf Simplify this code; it can use the regular CFG utlities rather than
the BlockTraits abstractions.

llvm-svn: 109268
2010-07-23 21:25:16 +00:00
Dan Gohman
188a4d7d53 Micro-optimize SCEVComplexityCompare.
llvm-svn: 109267
2010-07-23 21:20:52 +00:00
Dan Gohman
2de2b0713e Add a const qualifier.
llvm-svn: 109266
2010-07-23 21:18:55 +00:00
Dan Gohman
1694c4352a Use the proper type for shift counts. This fixes a bootstrap error.
llvm-svn: 109265
2010-07-23 21:08:12 +00:00
Devang Patel
01d5937192 IF directory name is empty then try to extract one using absolute file name.
llvm-svn: 109262
2010-07-23 20:36:13 +00:00
Bruno Cardoso Lopes
a80b57e5fc Add AVX version of CLMUL instructions
llvm-svn: 109248
2010-07-23 18:41:12 +00:00
Dan Gohman
8859ab786b DAGCombine (shl (anyext x, c)) to (anyext (shl x, c)) if the high bits
are not demanded. This often allows the anyext to be folded away.

llvm-svn: 109242
2010-07-23 18:03:30 +00:00
Dan Gohman
b5a26419b8 Make SDNode::dump() print a newline at the end.
llvm-svn: 109234
2010-07-23 16:37:47 +00:00
Gabor Greif
30f8e2112c fix constness warnings
llvm-svn: 109224
2010-07-23 13:28:47 +00:00
Gabor Greif
a04ffe0391 do not (implicitly) dereference iterator many times, cache it instead
llvm-svn: 109222
2010-07-23 10:23:01 +00:00
Mikhail Glushenkov
bbe02846de Formatting.
llvm-svn: 109216
2010-07-23 04:19:34 +00:00
Mikhail Glushenkov
bbeb485c74 Get rid of exceptions in llvmc.
llvmc can be now compiled with llvm-gcc on Windows.

llvm-svn: 109215
2010-07-23 03:42:55 +00:00