Commit Graph

12896 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
01f98abe3e Delete unused function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118743 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 23:56:02 +00:00
Devang Patel
62367045a4 Take care of special characters while creating named MDNode name to hold function specific local variable's info.
This fixes radar 8653152. I am checking in testcase as a separate check-in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118726 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 22:19:21 +00:00
Dan Gohman
075fb5d68f Enhance GVN to do more precise alias queries for non-local memory
references. For example, this allows gvn to eliminate the load in
this example:

  void foo(int n, int* p, int *q) {
    p[0] = 0;
    p[1] = 1;
    if (n) {
      *q = p[0];
    }
  }


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118714 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 20:37:15 +00:00
Andrew Trick
f4baeaf848 RABasic is nearly functionally complete. There are a few remaining
benchmarks hitting an assertion.
Adds LiveIntervalUnion::collectInterferingVRegs.
Fixes "late spilling" by checking for any unspillable live vregs among
all physReg aliases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118701 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 19:18:47 +00:00
Rafael Espindola
4283f4b81e Use MCSectionELF in places we know we have an ELF section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118699 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 19:05:07 +00:00
Dan Gohman
e88ccb545d Rename AccessesArguments and AccessesArgumentsReadonly, and rewrite
their comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118696 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 18:30:00 +00:00
Dan Gohman
b395e4a026 Fix a copy+pasto Duncan noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118693 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 18:18:23 +00:00
Dan Gohman
68a6056daf Add a doesAccessArgPointees helper function, and update code to use
it, and to be consistent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118692 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 18:17:28 +00:00
Dan Gohman
432d08cbdb Factor out the code for testing whether a function accesses
arbitrary memory into a helper function, and adjust some comments.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118687 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 17:34:04 +00:00
Dan Gohman
50bcaece67 Give NonLocalDepResult a NonLocalDepEntry member, replacing
indivudal members holding the same data, to clarify the relationship
between NonLocalDepResult and NonLocalDepEntry.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118686 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 17:15:52 +00:00
Michael J. Spencer
7aac79bdea System/Path: Update comments to match code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118682 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 15:05:50 +00:00
Duncan Sands
867fe8570f There is no EndPtr anymore - reinterpret the original comment in terms
of InputData.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118677 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 07:46:36 +00:00
Jim Grosbach
2c4d5125c7 Update ARMConstantPoolValue to not use a modifier string. Use an explicit
VariantKind marker to indicate the additional information necessary. Update
MC to handle the new Kinds. rdar://8647623



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118671 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 03:26:07 +00:00
Dan Gohman
42c31a7073 Make ModRefBehavior a lattice. Use this to clean up AliasAnalysis
chaining and simplify FunctionAttrs' GetModRefBehavior logic.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118660 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-10 01:02:18 +00:00
Rafael Espindola
34be396a12 Fixed version of 118639 with an extra assert to catch similar problems
earlier. Implicit bool -> int conversions are evil!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118651 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09 23:42:07 +00:00
Rafael Espindola
037b5be15a Revert previous patch. Missed a case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118645 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09 22:54:38 +00:00
Rafael Espindola
e61a1ac595 Remove IsExplicit. It was always false.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118639 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09 22:37:44 +00:00
Dan Gohman
50a04d067f Convert comments to doxygen syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118628 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09 20:33:57 +00:00
Dan Gohman
4a53f37a1a AccessesArgumentsReadonly is read-only.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118615 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09 19:50:00 +00:00
Dan Gohman
db78c4873e Add a AccessesArgumentsReadonly ModRefBehavior value, so that the intrinsic
property IntrReadArgMem can be modeled.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118614 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09 19:48:55 +00:00
Dan Gohman
467a0adfc8 Factor out the logic for onlyReadsMemory into a helper function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118611 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09 19:43:24 +00:00
Dan Gohman
7293ac1281 Delete AccessesArgumentsAndGlobals, which was unused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118610 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09 19:41:37 +00:00
Michael J. Spencer
87e0697a46 System/Path/Windows: Change GetRootDirectory to return file:/// instead of C:/.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118502 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-09 15:10:45 +00:00
Dan Gohman
902da265f6 Add some comments noting some correspondences between ModRefBehavior
values, LLVM IR function attributes, and LLVM intrinsic attributes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118455 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-08 23:46:02 +00:00
Devang Patel
2c4c6a5e8a Document parameters. Fix typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118424 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-08 18:28:34 +00:00
Dan Gohman
a25e5dbcc2 Extend the AliasAnalysis::pointsToConstantMemory interface to allow it
to optionally look for constant or local (alloca) memory.

Teach BasicAliasAnalysis::pointsToConstantMemory to look through Select
and Phi nodes, and to support looking for local memory.

Remove FunctionAttrs' PointsToLocalOrConstantMemory function, now that
AliasAnalysis knows all the tricks that it knew.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118412 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-08 16:45:26 +00:00
Dan Gohman
c80cbf2540 Delete getIntrinsicModRefBehavior. Clients can just use the normal
getModRefBehavior now, since it now understands intrinsics as well
as normal functions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118411 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-08 16:11:19 +00:00
Dan Gohman
6c25c920e6 Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118408 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-08 15:34:42 +00:00
Che-Liang Chiou
6da24ca51d Add registry hook for assembly text output
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118394 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-08 02:21:17 +00:00
Rafael Espindola
6bc6cd223c typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118376 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-07 13:48:10 +00:00
Rafael Espindola
9e07a149b0 Add method for checking if a path is a symbolic link.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118367 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-07 04:36:50 +00:00
Rafael Espindola
187d8339db Relax dwarf line fragments. This fixes a crash in the included testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118365 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-07 02:07:12 +00:00
Benjamin Kramer
f788854d20 Prune includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118342 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-06 11:45:59 +00:00
Chris Lattner
662e5a30e8 Reimplement BuildResultOperands to be in terms of the result instruction's
operand list instead of the operand list redundantly declared on the alias
or instruction.

With this change, we finally remove the ins/outs list on the alias.  Before:
  def : InstAlias<(outs GR16:$dst), (ins GR8 :$src),
                  "movsx $src, $dst",
                  (MOVSX16rr8W GR16:$dst, GR8:$src)>;
After:
  def : InstAlias<"movsx $src, $dst",
                  (MOVSX16rr8W GR16:$dst, GR8:$src)>;

This also makes the alias mechanism more general and powerful, which will
be exploited in subsequent patches.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118329 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-06 07:14:44 +00:00
Jim Grosbach
ba21957cbd Add '.code 32' assembler directive to MC streamers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118309 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-05 22:40:09 +00:00
Jim Grosbach
ce79299f78 MC'ize the '.code 16' and '.thumb_func' ARM directives.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118301 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-05 22:08:08 +00:00
Jim Grosbach
d54986f609 Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118296 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-05 20:41:12 +00:00
Jim Grosbach
c9d1439051 Allow targets to specify the MachO CPUType/CPUSubtype information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118288 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-05 18:48:58 +00:00
Jim Grosbach
c91b26281a Add v5 and v7 ARM CPU subtype values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118281 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-05 17:48:05 +00:00
Daniel Dunbar
f8254d6473 CrashRecoveryContext: Add RunSafelyOnThread helper function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118272 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-05 07:19:09 +00:00
Devang Patel
35fcd6557f Introduce DIBuilder. It is intended to be a front-end friendly interface to emit debuggging information entries in LLVM IR.
To create debugging information for a pointer, using DIBUilder front-end just needs
	DBuilder.CreatePointerType(Ty, Size);
instead of
	DebugFactory.CreateDerivedType(llvm::dwarf::DW_TAG_pointer_type,
                                       TheCU, "", getOrCreateMainFile(),
                                       0, Size, 0, 0, 0, OCTy);



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118248 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-04 15:01:38 +00:00
Devang Patel
ab70ed41f3 Add getFile() to get DIFile of a DIType.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118247 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-04 14:56:34 +00:00
Duncan Sands
1e96bab329 In the calling convention logic, ValVT is always a legal type,
and as such can be represented by an MVT - the more complicated
EVT is not needed.  Use MVT for ValVT everywhere.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118245 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-04 10:49:57 +00:00
Daniel Dunbar
ea8e20696e System: Add llvm_execute_on_thread, which does what it says.
- Primarily useful for running some code with a specified stack size, when
   pthreads are available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118222 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-04 01:26:25 +00:00
Mikhail Glushenkov
d66f2b74f2 Rename FindExecutable to PrependMainExecutablePath.
Makes it more clear that it is just a path manipulation function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118174 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 16:14:16 +00:00
Duncan Sands
cdfad36b40 Simplify uses of MVT and EVT. An MVT can be compared directly
with a SimpleValueType, while an EVT supports equality and
inequality comparisons with SimpleValueType.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118169 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 12:17:33 +00:00
Duncan Sands
538b0cdc76 Fix a comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118168 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 11:55:03 +00:00
Duncan Sands
1440e8b918 Inside the calling convention logic LocVT is always a simple
value type, so there is no point in passing it around using
an EVT.  Use the simpler MVT everywhere.  Rather than trying
to propagate this information maximally in all the code that
using the calling convention stuff, I chose to do a mainly
low impact change instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118167 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 11:35:31 +00:00
Evan Cheng
dfed19fe2c Fix preload instruction isel. Only v7 supports pli, and only v7 with mp extension supports pldw. Add subtarget attribute to denote mp extension support and legalize illegal ones to nothing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118160 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 06:34:55 +00:00
Evan Cheng
8239daf7c8 Two sets of changes. Sorry they are intermingled.
1. Fix pre-ra scheduler so it doesn't try to push instructions above calls to
   "optimize for latency". Call instructions don't have the right latency and
   this is more likely to use introduce spills.
2. Fix if-converter cost function. For ARM, it should use instruction latencies,
   not # of micro-ops since multi-latency instructions is completely executed
   even when the predicate is false. Also, some instruction will be "slower"
   when they are predicated due to the register def becoming implicit input.
   rdar://8598427


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118135 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-03 00:45:17 +00:00