Commit Graph

97166 Commits

Author SHA1 Message Date
Joerg Sonnenberger
72580780a9 Move the STT_FILE symbols out of the normal symbol table processing for
ELF. They can overlap with the other symbols, e.g. if a source file
"foo.c" contains a function "foo" with a static variable "c".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193569 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-29 01:06:17 +00:00
Manman Ren
8ef9cebb68 Debug Info: use createAndAddDIE to wrap around "new DIE" in DwarfDebug.
This commit ensures DIEs are constructed within a compile unit and
immediately added to their parents.

Reviewed off-list by Eric.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193568 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-29 01:03:01 +00:00
Manman Ren
bbdd02cc30 Debug Info: use createAndAddDIE for newly-created Subprogram DIEs.
More patches will be submitted to convert "new DIE(" to use createAddAndDIE in
DwarfCompileUnit.cpp. This will simplify implementation of addDIEEntry where
we have to decide between ref4 and ref_addr, because DIEs that can be shared
across CU will be added to a CU already.

Reviewed off-list by Eric.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193567 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-29 00:58:04 +00:00
Manman Ren
1a5e787f70 Debug Info: add a helper function createAndAddDIE.
It wraps around "new DIE(" and handles the bookkeeping part of the newly-created
DIE. It adds the DIE to its parent, and calls insertDIE if necessary. It makes
sure that bookkeeping is done at the earliest time and we should not see
parentless DIEs if all constructions of DIEs go through this helper function.

Later on, we can use an allocator for DIE allocation, and will only need to
change createAndAddDIE instead of modifying all the "new DIE(".

Reviewed off-list by Eric.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193566 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-29 00:53:03 +00:00
Alexey Samsonov
39f62fa3dd Merge DWARFDIE::extractFast and DWARFDIE::extract into one function.
Complicated CU-DIE-specific logic in the latter was never used,
and it makes sense to have safety checks for broken dwarf in the former.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193563 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 23:58:58 +00:00
Andrew Kaylor
61e22ea592 Renaming MCJIT .ir files to .ll and moving them to Inputs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193562 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 23:51:03 +00:00
Alexey Samsonov
6faff4886a DWARF parser: Use ArrayRef to represent form sizes and simplify DWARFDIE::extractFast() interface. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193560 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 23:41:49 +00:00
Alp Toker
1765daa21c lit: add missing substitutions for recently added tools
llvm-mcmarkup, obj2yaml and yaml2obj were missing from the substitutions list,
causing the test suite to fail in a sandboxed environment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193559 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 23:37:49 +00:00
Alp Toker
e794e41c35 Quote potential shell expansions found in tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193558 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 23:37:45 +00:00
Alexey Samsonov
d2d54e2b7c DWARF parser: since DWARF4, DW_AT_high_pc may be a constant representing function size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193555 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 23:15:15 +00:00
Alexey Samsonov
c5253237f8 DebugInfo: Introduce the notion of "form classes"
Summary:
Use DWARF4 table of form classes to fetch attributes from DIE
in a more consistent way. This shouldn't change the functionality and
serves as a refactoring for upcoming change: DW_AT_high_pc has different
semantics depending on its form class.

Reviewers: dblaikie, echristo

Reviewed By: echristo

CC: echristo, llvm-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1961

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193553 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 23:01:48 +00:00
Alp Toker
730e3c6995 Fix the lli --extra-module value_desc
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193552 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 22:51:25 +00:00
Rui Ueyama
bc850d0c6c Add a few tests for StringRef::{start,end}with.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193550 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 22:42:54 +00:00
Rafael Espindola
136660484d Convert another llc -filetype=obj test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193548 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 22:17:19 +00:00
Rafael Espindola
61e4743913 Convert another llc -filetype=obj test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193547 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 22:11:47 +00:00
Rafael Espindola
82c2703167 Convert another llc -filetype=obj test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193546 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 22:05:05 +00:00
Andrew Kaylor
61abf1550f Standardizing lli's extra module command line option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193544 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 21:58:15 +00:00
Bill Wendling
f39819d8e6 Remove stray '_'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193543 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 21:43:54 +00:00
Bill Wendling
0a8512a279 Use the correct reference. Spotted by Sean Silva.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193542 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 21:43:11 +00:00
Bill Wendling
9297890972 Remove 2.4 from the list of supported Python versions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193541 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 21:22:23 +00:00
Akira Hatanaka
5956bed699 [mips] Simplify LowerFormalArguments using getRegClassFor.
No functionality change.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193540 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 21:21:36 +00:00
Rafael Espindola
1df3e17fde Convert another llc -filetype=obj test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193539 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 21:12:15 +00:00
Rafael Espindola
9540074467 Convert another llc -filetype=obj test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193538 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 21:06:12 +00:00
Rafael Espindola
ade09c7fe7 Convert another llc -filetype=obj test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193537 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 20:59:41 +00:00
Rafael Espindola
e2f60cf7f1 Convert another llc -filetype=obj test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193536 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 20:54:33 +00:00
Lang Hames
3d478aee8e Return early from getUnconditionalBranchTargetOpValue if the branch target is
an MCExpr, in order to avoid writing an encoded zero value in the immediate
field.

When getUnconditionalBranchTargetOpValue is called with an MCExpr target, we
don't know what the final immediate field value should be. We shouldn't
explicitly set the immediate field to an encoded zero value as zero is encoded
with a non-zero bit pattern. This leads to bits being set that pollute the
final immediate value. The nature of the encoding is such that the polluted
bits only affect very large immediate values, explaining why this hasn't
caused problems earlier.

Fixes <rdar://problem/15155975>.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193535 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 20:51:11 +00:00
Rafael Espindola
164bd156fc Convert a llc -filetype=obj test into a llvm-mc test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193534 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 20:40:20 +00:00
Ahmed Bougacha
1799684671 TableGen: remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193527 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 18:19:04 +00:00
Ahmed Bougacha
2b43ffff32 TableGen: Refactor DAG patterns to enable parsing one pattern at a time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193526 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 18:07:21 +00:00
Ahmed Bougacha
254ce94c26 TableGen: Refactor AsmWriterEmitter to keep AsmWriterInsts.
These used to be referenced by the CGI->AWI map (in AsmWriterEmitter), but
stored in a vector local to EmitPrintInstruction. Move the vector to
AsmWriterEmitter too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193525 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 18:07:17 +00:00
Logan Chien
23125d02d9 [arm] Implement eabi_attribute, cpu, and fpu directives.
This commit allows the ARM integrated assembler to parse
and assemble the code with .eabi_attribute, .cpu, and
.fpu directives.

To implement the feature, this commit moves the code from
AttrEmitter to ARMTargetStreamers, and several new test
cases related to cortex-m4, cortex-r5, and cortex-a15 are
added.

Besides, this commit also change the Subtarget->isFPOnlySP()
to Subtarget->hasD16() to match the usage of .fpu directive.

This commit changes the test cases:

* Several .eabi_attribute directives in
  2010-09-29-mc-asm-header-test.ll are removed because the .fpu
  directive already cover the functionality.

* In the Cortex-A15 test case, the value for
  Tag_Advanced_SIMD_arch has be changed from 1 to 2,
  which is more precise.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193524 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 17:51:12 +00:00
Nuno Lopes
790b973f80 simplify ConstantRange::getSetSize()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193523 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 16:52:38 +00:00
Richard Sandiford
349baa6039 [SystemZ] Set usaAA to true
useAA significantly improves the handling of vector code that has TBAA
information attached.  It also helps other cases, as shown by the testsuite
changes here.  The only real downside I've seen is that it interferes with
MergeConsecutiveStores.  The problem is that that optimization works top
down, starting at the first store in the chain, and looks for cases where
the chain result is only used by a single related store.  These related
stores don't alias, so useAA will have rewritten all the later stores to
use a different chain input (typically the same one as the first store).

I think the advantages outweigh the disadvantages though, so for now I've
just disabled alias analysis for the unaligned-01.ll test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193521 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 13:53:37 +00:00
Richard Sandiford
a7be36c8eb [DAGCombiner] Respect volatility when checking for aliases
Making useAA() default to true for SystemZ showed that the combiner alias
analysis wasn't handling volatile accesses.  This hit many of the SystemZ
tests, but I arbitrarily picked one for the purpose of this patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193518 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 12:00:00 +00:00
Richard Sandiford
66589dcc8f Keep TBAA info when rewriting SelectionDAG loads and stores
Most SelectionDAG code drops the TBAA info when creating a new form of a
load and store (e.g. during legalization, or when converting a plain
load to an extending one).  This patch tries to catch all cases where
the TBAA information can legitimately be carried over.

The patch adds alternative forms of getLoad() and getExtLoad() that take
a MachineMemOperand instead of individual fields.  (The corresponding
getTruncStore() already exists.)  The idea is to use the MachineMemOperand
forms when all fields are carried over (size, pointer info, isVolatile,
isNonTemporal, alignment and TBAA info).  If some adjustment is being
made, e.g. to narrow the load, then we still pass the individual fields
but also pass the TBAA info.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193517 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 11:17:59 +00:00
Alp Toker
188545867d lit: multiprocessing platform fix attempt
The error raised by Python varies by platform(!), so let's just catch any
exception and fall back.

Thanks to Sylvestre Ledru for noticing this on a Debian / Python 2.7 system
running code coverage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193516 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 10:26:13 +00:00
Benjamin Kramer
19ea37059a SCEV: Make the final add of an inbounds GEP nuw if we know that the index is positive.
We can't do this for the general case as saying a GEP with a negative index
doesn't have unsigned wrap isn't valid for negative indices.
  %gep = getelementptr inbounds i32* %p, i64 -1

But an inbounds GEP cannot run past the end of address space. So we check for
the very common case of a positive index and make GEPs derived from that NUW.
Together with Andy's recent non-unit stride work this lets us analyze loops
like

  void foo3(int *a, int *b) {
    for (; a < b; a++) {}
  }

PR12375, PR12376.

Differential Revision: http://llvm-reviews.chandlerc.com/D2033

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193514 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 07:30:06 +00:00
NAKAMURA Takumi
1fe9069d53 Prune utf8 chars in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193512 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 04:07:38 +00:00
NAKAMURA Takumi
f3ad574568 Prune trailing linefeeds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193511 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 04:07:31 +00:00
NAKAMURA Takumi
661bd3df75 Target/R600: Un-tab-ify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193510 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 04:07:23 +00:00
Reed Kotler
cb2280e4c7 Make first substantial checkin of my port of ARM constant islands code to Mips.
Before I just ported the shell of the pass. I've tried to keep everything
nearly identical to the ARM version. I think it will be very easy to eventually
merge these two and create a new more general pass that other targets can
use. I have some improvements I would like to make to allow pools to 
be shared across functions and some other things. When I'm all done we
can think about making a more general pass. More to be ported but the
basic mechanism works now almost as good as gcc mips16.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193509 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-27 21:57:36 +00:00
Alp Toker
bbe8f3b0e1 Clarify the comment about BSD versions in r193465
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193508 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-27 20:49:19 +00:00
Benjamin Kramer
703c75c8ae NVPTX: Remove unused globals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193500 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-27 11:31:46 +00:00
Benjamin Kramer
41f75d1671 Hexagon: Remove global state.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193499 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-27 11:16:09 +00:00
NAKAMURA Takumi
f61049b2d8 MCJIT-remote: __main should be resolved in child context.
- Mark tests as XFAIL:cygming in test/ExecutionEngine/MCJIT/remote.
    Rather to suppress them, I'd like to leave them running as XFAIL.
  - Revert r193472. RecordMemoryManager no longer resolves __main on cygming.

There are a couple of issues.

  - X86 Codegen emits "call __main" in @main for targeting cygming.
    It is useless in JIT. FYI, tests are passing when emitting __main is disabled.
  - Current remote JIT does not resolve any symbols in child context.

FIXME: __main should be disabled, or remote JIT should resolve __main.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193498 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-27 10:22:52 +00:00
Elena Demikhovsky
62d66cbec5 AVX-512: PMIN/PMAX intrinsics and patterns
Patch by Cameron McInally <cameron.mcinally@nyu.edu>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193497 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-27 08:18:37 +00:00
Bill Wendling
cba7d7d579 A small grammar-os fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193496 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-27 05:09:12 +00:00
Bill Wendling
1a57aa4367 Update to current output.
PR14039

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193494 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-27 04:50:34 +00:00
Bill Wendling
4d7f7b1bbb Fix Sphinx warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193493 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-27 04:25:02 +00:00
Bill Wendling
09f8e132c8 Update to specify that both metadata and label types aren't proper return types.
PR15447

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193492 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-27 04:19:29 +00:00