1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

10714 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
967bcbf445 Add print methods
llvm-svn: 117143
2010-10-22 20:28:21 +00:00
Michael J. Spencer
08602f9803 X86: Base _fltused on the FunctionType of the called value instead of the potentially null "CalledFunction". Thanks Duncan!
This is needed for indirect calls.

llvm-svn: 117061
2010-10-21 20:49:23 +00:00
Jakob Stoklund Olesen
4794d28044 Don't include the destination interval in the union when computing
Parent - union(Y, ...). Doh.

llvm-svn: 117042
2010-10-21 18:47:08 +00:00
Jakob Stoklund Olesen
82da267156 Permit landing pad successor blocks when verifying basic blocks that end in an
unconditional branch.

llvm-svn: 117041
2010-10-21 18:47:06 +00:00
Duncan Sands
c40461600a The variable liTRC is not used for anything useful, zap it
(gcc-4.6 warning).

llvm-svn: 117022
2010-10-21 16:04:43 +00:00
Duncan Sands
0c166168a0 Remove some variables that are never really used
(gcc-4.6 warns about these).

llvm-svn: 117021
2010-10-21 16:03:28 +00:00
Michael J. Spencer
b9cffadc06 CodeGen-Windows: Only emit _fltused if a VarArg function is called with floating point args.
This should be the minimum set of functions that could possibly need it.

llvm-svn: 116978
2010-10-21 00:08:21 +00:00
Jakob Stoklund Olesen
03fd8bf61c Remember to keep track of rematted values.
llvm-svn: 116962
2010-10-20 22:50:42 +00:00
Evan Cheng
9a06e4c7c8 More accurate estimate / tracking of register pressure.
- Initial register pressure in the loop should be all the live defs into the
  loop. Not just those from loop preheader which is often empty.
- When an instruction is hoisted, update register pressure from loop preheader
  to the original BB.
- Treat only use of a virtual register as kill since the code is still SSA.

llvm-svn: 116956
2010-10-20 22:03:58 +00:00
Jakob Stoklund Olesen
9121d7b293 Move some of the InlineSpiller rematerialization code into LiveRangeEdit.
llvm-svn: 116951
2010-10-20 22:00:51 +00:00
Dale Johannesen
58fe3193a6 Remove Synthesizable from the Type system; as MMX vector
types are no longer Legal on X86, we don't need it.
No functional change.  8499854.

llvm-svn: 116947
2010-10-20 21:32:10 +00:00
Jakob Stoklund Olesen
c04876b607 When SimpleRegisterCoalescing is trimming kill flags on a physical register
operand, also check if subregisters are killed.

Add <imp-def> operands for subregisters that remain alive after a super register
is killed.

I don't have a testcase for this that reproduces on trunk. <rdar://problem/8441758>

llvm-svn: 116940
2010-10-20 18:45:55 +00:00
Dan Gohman
c781a28a1d Make CodeGen TBAA-aware.
llvm-svn: 116890
2010-10-20 00:31:05 +00:00
Jim Grosbach
a8c0be5343 Add a pre-dispatch SjLj EH hook on the unwind edge for targets to do any
setup they require. Use this for ARM/Darwin to rematerialize the base
pointer from the frame pointer when required. rdar://8564268

llvm-svn: 116879
2010-10-19 23:27:08 +00:00
Jakob Stoklund Olesen
02d7f65c49 Shrink MachineOperand from 40 to 32 bytes on 64-bit hosts.
Pull an unsigned out of the Contents union such that it has the same size as two
pointers and no padding.

Arrange members such that the Contents union and all pointers can be 8-byte
aligned without padding.

This speeds up code generation by 0.8% on a 64-bit host. 32-bit hosts should be
unaffected.

llvm-svn: 116857
2010-10-19 20:56:32 +00:00
Evan Cheng
1c8dafd12a Re-enable register pressure aware machine licm with fixes. Hoist() may have
erased the instruction during LICM so UpdateRegPressureAfter() should not
reference it afterwards.

llvm-svn: 116845
2010-10-19 18:58:51 +00:00
Owen Anderson
46990c17f7 Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which
must be called in the pass's constructor.  This function uses static dependency declarations to recursively initialize
the pass's dependencies.

Clients that only create passes through the createFooPass() APIs will require no changes.  Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.

I have tested this with all standard configurations of clang and llvm-gcc on Darwin.  It is possible that there are problems
with the static dependencies that will only be visible with non-standard options.  If you encounter any crash in pass
registration/creation, please send the testcase to me directly.

llvm-svn: 116820
2010-10-19 17:21:58 +00:00
Daniel Dunbar
6ff550c84d Revert r116781 "- Add a hook for target to determine whether an instruction def
is", which breaks some nightly tests.

llvm-svn: 116816
2010-10-19 17:14:24 +00:00
NAKAMURA Takumi
4a85646d6c lib/CodeGen/TargetLoweringObjectFileImpl.cpp: Tweak to emit ".{section}${name}" instead of ".{section}$linkonce_{name}" for linkonce sections.
It seems GNU ld/PECOFF relies on section names, linking with g++'s libstdc++.a would fail.

llvm-svn: 116791
2010-10-19 03:24:42 +00:00
Andrew Trick
3df2830391 Fix for machine licm assert: RCCost <= RegPressure[RCId]
in MultiSource/Benchmarks/VersaBench/beamformer/beamformer.
SmallSet.insert returns true if the element is inserted.

llvm-svn: 116790
2010-10-19 02:50:50 +00:00
Evan Cheng
9c3f6f486e - Add a hook for target to determine whether an instruction def is
"long latency" enough to hoist even if it may increase spilling. Reloading
  a value from spill slot is often cheaper than performing an expensive
  computation in the loop. For X86, that means machine LICM will hoist
  SQRT, DIV, etc. ARM will be somewhat aggressive with VFP and NEON
  instructions.
- Enable register pressure aware machine LICM by default.

llvm-svn: 116781
2010-10-19 00:55:07 +00:00
Bill Wendling
3b3d9aaa86 Don't recompute MachineRegisterInfo in the Optimize* method.
llvm-svn: 116750
2010-10-18 21:22:31 +00:00
Dan Gohman
df5c887e86 Add TypeBasedAliasAnalysis to the standard pass lists. Note that it
is currently inert by default.

llvm-svn: 116732
2010-10-18 18:50:27 +00:00
Dan Gohman
6aff5b94ff Make BasicAliasAnalysis a normal AliasAnalysis implementation which
does normal initialization and normal chaining. Change the default
AliasAnalysis implementation to NoAlias.

Update StandardCompileOpts.h and friends to explicitly request
BasicAliasAnalysis.

Update tests to explicitly request -basicaa.

llvm-svn: 116720
2010-10-18 18:04:47 +00:00
Jim Grosbach
315bb0cf2b Trivial grammar tweak.
llvm-svn: 116710
2010-10-18 16:29:26 +00:00
Michael J. Spencer
e57b670425 X86-Windows: Emit an undefined global __fltused symbol when targeting Windows
if any floating point arguments are passed to an external function.

llvm-svn: 116665
2010-10-16 08:25:41 +00:00
Michael J. Spencer
16ad2c129c Whitespace!
llvm-svn: 116664
2010-10-16 08:25:21 +00:00
Evan Cheng
5bd7971922 More machine LICM work. It now tracks register pressure for path from preheader to current BB and use the information determine whether hoisting is worthwhile.
llvm-svn: 116654
2010-10-16 02:20:26 +00:00
Jakob Stoklund Olesen
05c010aa88 Remove unused accessor.
llvm-svn: 116580
2010-10-15 16:06:40 +00:00
Jakob Stoklund Olesen
b569fb0904 Eliminate curli from SplitEditor. Use the LiveRangeEdit reference instead.
llvm-svn: 116547
2010-10-15 00:34:01 +00:00
Jakob Stoklund Olesen
5d5bcb8ee4 Move stack slot assignments into LiveRangeEdit.
All registers created during splitting or spilling are assigned to the same
stack slot as the parent register.

When splitting or rematting, we may not spill at all. In that case the stack
slot is still assigned, but it will be dead.

llvm-svn: 116546
2010-10-15 00:16:55 +00:00
Jakob Stoklund Olesen
acca65b973 Create a new LiveRangeEdit class to keep track of the new registers created when
splitting or spillling, and to help with rematerialization.

Use LiveRangeEdit in InlineSpiller and SplitKit. This will eventually make it
possible to share remat code between InlineSpiller and SplitKit.

llvm-svn: 116543
2010-10-14 23:49:52 +00:00
Jakob Stoklund Olesen
e0b9dbf91b Only split around a loop if the live range has uses outside the loop periphery.
Before we would also split around a loop if any peripheral block had multiple
uses. This could cause repeated splitting when splitting a different live range
would insert uses into the periphery.

Now -spiller=inline passes the nightly test suite again.

llvm-svn: 116494
2010-10-14 18:26:45 +00:00
Evan Cheng
e1e152c3fc Register pressure and instruction latency aware machine LICM. Work in progress.
llvm-svn: 116465
2010-10-14 01:16:09 +00:00
Owen Anderson
c65395a991 Analysis groups need to initialize their default implementations.
llvm-svn: 116441
2010-10-13 21:49:58 +00:00
Owen Anderson
63f757463c Begin adding static dependence information to passes, which will allow us to
perform initialization without static constructors AND without explicit initialization
by the client.  For the moment, passes are required to initialize both their
(potential) dependencies and any passes they preserve.  I hope to be able to relax
the latter requirement in the future.

llvm-svn: 116334
2010-10-12 19:48:12 +00:00
Jakob Stoklund Olesen
44943ef3f8 Replace FindLiveRangeContaining() with getVNInfoAt() in LiveIntervalAnalysis.
This helps hiding the LiveRange class which really should be private.

llvm-svn: 116244
2010-10-11 21:45:03 +00:00
Jakob Stoklund Olesen
ecf3e62010 Properly handle reloading and spilling around partial redefines in
LocalRewriter.

This is a bit of a hack that adds an implicit use operand to model the
read-modify-write nature of a partial redef. Uses and defs are rewritten in
separate passes, and a single operand would never be processed twice.

<rdar://problem/8518892>

llvm-svn: 116210
2010-10-11 18:10:36 +00:00
Chris Lattner
c9709f154d Per discussion with Sanjiv, remove the PIC16 target from mainline. When/if
it comes back, it will be largely a rewrite, so keeping the old codebase
in tree isn't helping anyone.

llvm-svn: 116190
2010-10-11 05:44:40 +00:00
Chris Lattner
b63869a25b fix the default va_arg expansion (in the realignment case) to not implicitly
truncate the stack pointer to 32-bits on a 64-bit machine.

llvm-svn: 116169
2010-10-10 18:36:26 +00:00
Benjamin Kramer
e2a5f1be3b Silence compiler warning.
llvm-svn: 116156
2010-10-09 16:36:44 +00:00
Jakob Stoklund Olesen
8c2e951b2b Rename SplitEditor::rewrite to finish() and break it out into a couple of new
functions: computeRemainder and rewrite.

When the remainder breaks up into multiple components, remember to rewrite those
uses as well.

llvm-svn: 116121
2010-10-08 23:42:21 +00:00
Evan Cheng
7904166763 Avoid compiler warning: comparison between signed and unsigned integer.
llvm-svn: 116119
2010-10-08 23:01:57 +00:00
Jakob Stoklund Olesen
c14c1d2e21 Extract method ProcessUses from LocalRewriter::RewriteMBB. Both parent and child
are still way too long, but it's a start.

No functional change intended.

llvm-svn: 116116
2010-10-08 22:14:41 +00:00
Anton Korobeynikov
c425302670 Do not check that the bodies of two defs of same linkonce global are the same.
Such a check does not make any sense in presense of inlining and other compiler-dependent stuff.
This should fix bunch of warnings on mingw32.

llvm-svn: 116113
2010-10-08 21:50:04 +00:00
Jakob Stoklund Olesen
9d127e625c Classify value numbers into connected components in linear time.
llvm-svn: 116105
2010-10-08 21:19:28 +00:00
Rafael Espindola
bfd3c31acf Call InitSections in llc and clang so that the binaries produced by them
are easier to diff with those produced by llvm-mc.

llvm-svn: 116095
2010-10-08 19:37:38 +00:00
Evan Cheng
8833658eb0 Don't waste time unfolding simple loads. The unfolded copy won't be hoisted.
llvm-svn: 116081
2010-10-08 18:59:19 +00:00
Evan Cheng
b6cde7cdf4 Fix operand latency computation in cases where the definition operand is
implicit. e.g.
%D6<def>, %D7<def> = VLD1q16 %R2<kill>, 0, ..., %Q3<imp-def>                                                                                                                                                                              
%Q1<def> = VMULv8i16 %Q1<kill>, %Q3<kill>, ...

The real definition indices are 0,1.

llvm-svn: 116080
2010-10-08 18:42:25 +00:00
Devang Patel
3090b0ebf1 Line number 0 indicates there is no source line/file name info available for this construct.
llvm-svn: 116061
2010-10-08 17:18:54 +00:00