1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00
Commit Graph

8094 Commits

Author SHA1 Message Date
Dan Gohman
5ce716719b Clarify the definition of "latch block" in a comment.
llvm-svn: 64916
2009-02-18 16:43:19 +00:00
Dan Gohman
30770ee7b3 Add explicit keywords.
llvm-svn: 64915
2009-02-18 16:37:45 +00:00
Nate Begeman
5e78e558ff Add support to the JIT for true non-lazy operation. When a call to a function
that has not been JIT'd yet, the callee is put on a list of pending functions
to JIT.  The call is directed through a stub, which is updated with the address
of the function after it has been JIT'd.  A new interface for allocating and
updating empty stubs is provided.

Add support for removing the ModuleProvider the JIT was created with, which
would otherwise invalidate the JIT's PassManager, which is initialized with the
ModuleProvider's Module.

Add support under a new ExecutionEngine flag for emitting the infomration 
necessary to update Function and GlobalVariable stubs after JITing them, by
recording the address of the stub and the name of the GlobalValue.  This allows
code to be copied from one address space to another, where libraries may live
at different virtual addresses, and have the stubs updated with their new
correct target addresses.

llvm-svn: 64906
2009-02-18 08:31:02 +00:00
Dan Gohman
9c258bd2ec Factor out the code to add a MachineOperand to a MachineInstrBuilder.
llvm-svn: 64891
2009-02-18 05:45:50 +00:00
Dan Gohman
0e73582689 Eliminate several more unnecessary intptr_t casts.
llvm-svn: 64888
2009-02-18 05:09:16 +00:00
Chris Lattner
733259fd3a allow TimeRegion to take a potentially-null pointer to a
timer for clang.

llvm-svn: 64874
2009-02-18 01:48:17 +00:00
Devang Patel
25f2741ae9 The debugger sometimes lookup dynamically in the runtime to find ivar info of any Objective-C classes. It would be very helpful to debugger if the compiler encodes runtime version number in DWARF.
Add support for two additional DWARF attributes to encode Objective-C runtime version number.

llvm-svn: 64834
2009-02-17 22:43:44 +00:00
Scott Michel
4c5fa6c982 Remove trailing whitespace to reduce later commit patch noise.
(Note: Eventually, commits like this will be handled via a pre-commit hook that
 does this automagically, as well as expand tabs to spaces and look for 80-col
 violations.)

llvm-svn: 64827
2009-02-17 22:15:04 +00:00
Devang Patel
1d4e0292fb Emit debug info for bitfields.
llvm-svn: 64815
2009-02-17 21:23:59 +00:00
Dan Gohman
59b08852dc Add a method to ScalarEvolution for telling it when a loop has been
modified in a way that may effect the trip count calculation. Change
IndVars to use this method when it rewrites pointer or floating-point
induction variables instead of using a doInitialization method to
sneak these changes in before ScalarEvolution has a chance to see
the loop. This eliminates the need for LoopPass to depend on
ScalarEvolution.

llvm-svn: 64810
2009-02-17 20:49:49 +00:00
Dan Gohman
c99426d513 Move dumpPassStructure out of line.
llvm-svn: 64796
2009-02-17 19:41:26 +00:00
Dan Gohman
03b5be8648 Tidy whitespace.
llvm-svn: 64791
2009-02-17 19:34:54 +00:00
Bill Wendling
266c8bc98f --- Merging (from foreign repository) r64714 into '.':
U    include/llvm/CodeGen/DebugLoc.h
U    lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
U    lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
U    lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp

Enable debug location generation at -Os. This goes with the reapplication of the
r63639 patch.

llvm-svn: 64715
2009-02-17 01:04:54 +00:00
Evan Cheng
9a8e419015 Strengthen the "non-constant stride must dominate loop preheader" check.
llvm-svn: 64703
2009-02-17 00:13:06 +00:00
Daniel Dunbar
778db8ec9b Add llvm::RoundUpToAlignment.
- No functionality change.

llvm-svn: 64691
2009-02-16 22:57:04 +00:00
Ted Kremenek
53921b8722 Fix bug where APSInt::operator-- incremented instead of decremented.
llvm-svn: 64687
2009-02-16 22:39:08 +00:00
Mikhail Glushenkov
0893cd31fa 80-column violation.
llvm-svn: 64586
2009-02-15 11:32:31 +00:00
Cedric Venet
243a1d9a39 Add mode_t to the config.h generated by cmake on win32. Used by clang.
llvm-svn: 64555
2009-02-14 16:13:26 +00:00
Cedric Venet
48be6b5e15 Unbreak the build on win32.
Cleanup some warning.

Remark: when struct/class are declared differently than they are defined, this make problem for VC++ since it seems to mangle class differently that struct. These error are very hard to understand and find. So please, try to keep your definition/declaration in sync.

Only tested with VS2008. hope it does not break anything. feel free to revert.

llvm-svn: 64554
2009-02-14 16:06:42 +00:00
Mikhail Glushenkov
2b985a1694 80-column violation.
llvm-svn: 64550
2009-02-14 08:41:25 +00:00
Duncan Sands
1ccae107d2 The trampoline intrinsic can be marked IntrWriteArgMem,
now that this no longer implies nocapture.

llvm-svn: 64540
2009-02-14 05:33:26 +00:00
Duncan Sands
5e53007833 IntrWriteArgMem implies nocapture, but this wasn't
taken advantage of anywhere.  Change the definition
of IntrWriteArgMem to no longer imply nocapture, and
explicitly add nocapture attributes everywhere (well,
not quite everywhere, because some of these intrinsics
did capture their arguments!).  Also, make clear that
the lack of other side-effects does not exclude doing
volatile loads or stores - the atomic intrinsics do
these, yet they are all marked IntrWriteArgMem (this
change is safe because nothing exploited it).

llvm-svn: 64539
2009-02-14 05:16:25 +00:00
Duncan Sands
9335c884e3 Correct a comment: since AccessArguments is now
being used for atomic intrinsics, it seems the
access may be volatile.  No code was exploiting
the original non-volatile definition, so only
the comment needs changing.

llvm-svn: 64464
2009-02-13 17:36:13 +00:00
Dale Johannesen
715b86151d Remove non-DebugLoc versions of BuildMI.
"I got blisters on my fingers."

llvm-svn: 64439
2009-02-13 02:35:20 +00:00
Dale Johannesen
5a21722625 Eliminate a couple of non-DebugLoc BuildMI variants.
Modify callers.

llvm-svn: 64409
2009-02-12 23:08:38 +00:00
Dan Gohman
02d4601fcf Teach IndVarSimplify to optimize code using the C "int" type for
loop induction on LP64 targets. When the induction variable is
used in addressing, IndVars now is usually able to inserst a
64-bit induction variable and eliminates the sign-extending cast.
This is also useful for code using C "short" types for
induction variables on targets with 32-bit addressing.

Inserting a wider induction variable is easy; the tricky part is
determining when trunc(sext(i)) expressions are no-ops. This
requires range analysis of the loop trip count. A common case is
when the original loop iteration starts at 0 and exits when the
induction variable is signed-less-than a fixed value; this case
is now handled.

This replaces IndVarSimplify's OptimizeCanonicalIVType. It was
doing the same optimization, but it was limited to loops with
constant trip counts, because it was running after the loop
rewrite, and the information about the original induction
variable is lost by that point.

Rename ScalarEvolution's executesAtLeastOnce to
isLoopGuardedByCond, generalize it to be able to test for
ICMP_NE conditions, and move it to be a public function so that
IndVars can use it.

llvm-svn: 64407
2009-02-12 22:19:27 +00:00
Nate Begeman
8b548c0a9e Add suppport for ConstantExprs of shufflevectors whose result type is not equal to the
type of the vectors being shuffled.

llvm-svn: 64401
2009-02-12 21:28:33 +00:00
Dan Gohman
f74d17b36a Add a utility function to LoopInfo to return the exit block
when the loop has exactly one exit, and make use of it in
LoopIndexSplit.

llvm-svn: 64388
2009-02-12 18:08:24 +00:00
Chris Lattner
c21f591628 Add operator->, patch by Ben Laurie!
llvm-svn: 64378
2009-02-12 17:14:49 +00:00
Ted Kremenek
5a94b8568b Add method 'isSingleton()' to ImmutableSet. This returns true if the set contains exactly one element.
llvm-svn: 64359
2009-02-12 05:17:02 +00:00
Gabor Greif
5f0aab656e Fill in a glaring omission in derived User classes, namely
add efficient versions of op_begin and op_end. Up to now always those from User have been
called, which in most cases follow an indirection (OperandList) even if the exact Instruction 
type is known.

llvm-svn: 64331
2009-02-11 22:09:00 +00:00
Ted Kremenek
0a2860176f Add FoldingSet profile method for bools. Patch by Ben Laurie!
llvm-svn: 64324
2009-02-11 20:53:17 +00:00
Dan Gohman
7e48e82adb When scheduling a block in parts, keep track of the overall
instruction index across each part. Instruction indices are used
to make live range queries, and live ranges can extend beyond
scheduling region boundaries.

Refactor the ScheduleDAGSDNodes class some more so that it
doesn't have to worry about this additional information.

llvm-svn: 64288
2009-02-11 04:27:20 +00:00
Dan Gohman
74401d22c2 It isn't necessary to explicitly clear the contents of std::vector
and DenseMap members in a destructor. And tidy up a comment.

llvm-svn: 64265
2009-02-11 00:18:15 +00:00
Dan Gohman
f2b9543ee5 Factor out more code for computing register live-range informationfor
scheduling, and generalize is so that preserves state across
scheduling regions. This fixes incorrect live-range information around
terminators and labels, which are effective region boundaries.

In place of looking for terminators to anchor inter-block dependencies,
introduce special entry and exit scheduling units for this purpose.

llvm-svn: 64254
2009-02-10 23:27:53 +00:00
Devang Patel
7377e7aa89 Enable scalar replacement of AllocaInst whose one of the user is dbg info.
llvm-svn: 64207
2009-02-10 07:00:59 +00:00
Gabor Greif
f47945d757 incorporate review feedback
llvm-svn: 64158
2009-02-09 20:27:45 +00:00
Mikhail Glushenkov
bcf9e92ecf 80-column violations.
llvm-svn: 64147
2009-02-09 17:11:05 +00:00
Gabor Greif
5de6cc843a make sure that BranchInst::getSuccessor() does not assert in cast<>
even if the underlying operand is NULL. This may happen in debugging context
within opt with partial loop unrolling (see test/Transforms/LoopUnroll/partial.ll).
After this fix I can resubmit the (backed out) r63459:
* lib/VMCore/AsmWriter.cpp: use precise accessors.

llvm-svn: 64142
2009-02-09 15:45:06 +00:00
Bill Wendling
a03453cace These function return 'void'. Don't have 'return' return anything.
llvm-svn: 64136
2009-02-09 12:31:26 +00:00
Evan Cheng
9dc1507838 Turns out AnalyzeBranch can modify the mbb being analyzed. This is a nasty
suprise to some callers, e.g. register coalescer. For now, add an parameter
that tells AnalyzeBranch whether it's safe to modify the mbb. A better
solution is out there, but I don't have time to deal with it right now.

llvm-svn: 64124
2009-02-09 07:14:22 +00:00
Mikhail Glushenkov
ed5cc8a9cf 80-column violation.
llvm-svn: 64102
2009-02-08 22:48:07 +00:00
Mikhail Glushenkov
d9f64e601f Add a Sleep() function.
llvm-svn: 64101
2009-02-08 22:47:39 +00:00
Evan Cheng
a7287a61fb Fix PR3486. Fix a bug in code that manually patch physical register live interval after its sub-register is coalesced with a virtual register.
llvm-svn: 64082
2009-02-08 11:04:35 +00:00
Evan Cheng
b5792305b3 Strengthen the previous check.
llvm-svn: 64076
2009-02-08 08:24:28 +00:00
Evan Cheng
7d46312873 (no commit message)
llvm-svn: 64073
2009-02-08 07:48:37 +00:00
Dan Gohman
4105a38248 Constify TargetInstrInfo::EmitInstrWithCustomInserter, allowing
ScheduleDAG's TLI member to use const.

llvm-svn: 64018
2009-02-07 16:15:20 +00:00
Dan Gohman
154fb54e7f Change several SmallPtrSetImpl members from public to protected,
to make the encapsulation more clear.

llvm-svn: 64017
2009-02-07 16:12:23 +00:00
Dan Gohman
3dcfaa7acc Simplify some code by using blocks_begin(), blocks_end(), and
the iterator typedefs instead of handling the std::vector
directly.

llvm-svn: 64016
2009-02-07 16:10:35 +00:00
Nick Lewycky
f273659759 Add an API for strings with possible NULLs in the middle. Refactor the other
two AddString methods to use it.

llvm-svn: 64005
2009-02-07 04:57:08 +00:00