Commit Graph

100219 Commits

Author SHA1 Message Date
Tobias Grosser 8ddf9a1f77 Avoid collisions with Objective-C++ keywords
Change parameter names exposed in headers to avoid collisions with Objective-C++
keywords.

Contributed-by: Graham Lee <graham@iamleeg.com>
llvm-svn: 201727
2014-02-19 22:16:53 +00:00
Tobias Grosser ff57ba18b9 Fix typo
Found by: Duncan P. N. Exon Smith <dexonsmith@apple.com>

llvm-svn: 201726
2014-02-19 22:16:49 +00:00
Reed Kotler d2da810961 Make one statement easier to understand from post commmit feedback from a
review of the previous patch that introduced this week.

llvm-svn: 201723
2014-02-19 22:11:45 +00:00
Roman Divacky 37136c0333 Expand 64bit {SHL,SHR,SRA}_PARTS on sparcv9.
llvm-svn: 201718
2014-02-19 21:35:39 +00:00
Rafael Espindola a3ad4e693c move getNameWithPrefix and getSymbol to TargetMachine.
TargetLoweringBase is implemented in CodeGen, so before this patch we had
a dependency fom Target to CodeGen. This would show up as a link failure of
llvm-stress when building with -DBUILD_SHARED_LIBS=ON.

This fixes pr18900.

llvm-svn: 201711
2014-02-19 20:30:41 +00:00
Rafael Espindola daeafb4c2a Add back r201608, r201622, r201624 and r201625
r201608 made llvm corretly handle private globals with MachO. r201622 fixed
a bug in it and r201624 and r201625 were changes for using private linkage,
assuming that llvm would do the right thing.

They all got reverted because r201608 introduced a crash in LTO. This patch
includes a fix for that. The issue was that TargetLoweringObjectFile now has
to be initialized before we can mangle names of private globals. This is
trivially true during the normal codegen pipeline (the asm printer does it),
but LTO has to do it manually.

llvm-svn: 201700
2014-02-19 17:23:20 +00:00
Eli Bendersky f0f210052f Refactor TargetOptions initialization into a single place.
The same code (~20 lines) for initializing a TargetOptions object from CodeGen
cmdline flags is duplicated 4 times in 4 different tools. This patch moves it
into a utility function.

Since the CodeGen/CommandFlags.h file defines cl::opt flags in a header, it's
a bit of a touchy situation because we should only link them into tools. So this
patch puts the init function in the header.

llvm-svn: 201699
2014-02-19 17:09:35 +00:00
Christian Pirker bd1eb0db1f Test commit - remove the new line to lib/Target/AArch64/AArch64TargetMachine.cpp.
llvm-svn: 201698
2014-02-19 16:58:28 +00:00
Daniel Sanders e15c1bbb69 [mips] Use multiple FileCheck prefixes rather than run the test multiple times
llvm-svn: 201695
2014-02-19 16:27:36 +00:00
Daniel Sanders acb20adbe4 [mips] In the integrated assembler, select the default feature bits by changing the CPU value.
This is consistent with the way CodeGen acheives this. However, CodeGen
always selects mips32 (even when the architecture is mips64).

llvm-svn: 201694
2014-02-19 16:13:26 +00:00
Christian Pirker 25ff038545 Test commit - added a new line to lib/Target/AArch64/AArch64TargetMachine.cpp.
llvm-svn: 201692
2014-02-19 16:07:32 +00:00
Venkatraman Govindaraju 55824b176a [Sparc] Remove spurious checks from a testcase.
llvm-svn: 201690
2014-02-19 15:57:49 +00:00
Daniel Sanders b3172307b8 [mips] Use llvm::Triple in ParseMipsTriple() instead of manually parsing it
No functional change.

llvm-svn: 201689
2014-02-19 15:55:21 +00:00
Rafael Espindola 2173603825 This reverts commit r201625 and r201624.
Since r201608 got reverted, it is not safe to use private linkage in these cases
until it is committed back.

llvm-svn: 201688
2014-02-19 15:49:46 +00:00
Daniel Sanders 12b82dd6ca [mips] Add explicit N32 and N64 tests to nabi-regs.s test
llvm-svn: 201684
2014-02-19 15:30:54 +00:00
Alexey Samsonov 9225ba31de Support GTest for FreeBSD platforms (9.x)
Patch by Viktor Kutuzov!

llvm-svn: 201683
2014-02-19 15:18:30 +00:00
Daniel Sanders 4d4f3d98de [mips] Remove unused NotN64 predicate
llvm-svn: 201682
2014-02-19 15:16:47 +00:00
Cameron McInally 7b544f0297 Fix AVX512 vector sqrt assembly strings.
llvm-svn: 201681
2014-02-19 15:16:09 +00:00
Logan Chien 366e013312 Disable override and final C++ keyword in gcc 4.6.
According to http://gcc.gnu.org/projects/cxx0x.html,
override and final keyword was added in gcc 4.7.  Thus,
we should not use these keywords in gcc 4.6 even when
__GXX_EXPERIMENTAL_CXX0X__ is available.

llvm-svn: 201679
2014-02-19 15:04:29 +00:00
Daniel Jasper 7e198ad862 Revert r201622 and r201608.
This causes the LLVMgold plugin to segfault. More information on the
replies to r201608.

llvm-svn: 201669
2014-02-19 12:26:01 +00:00
Tim Northover d495642c54 X86: move test requiring X86TargetLowering info into its own directory
If LLVM is built without X86 as a supported target then the test would
mysteriously fail.

llvm-svn: 201668
2014-02-19 12:24:19 +00:00
Tim Northover d496355b53 Try addding datalayout in case that's what Hexagon doesn't like.
Just a wild stab in the dark really, but in the absence of any ability to
reproduce the problem...

llvm-svn: 201658
2014-02-19 10:32:40 +00:00
Tim Northover aeb8e06d4c X86 CodeGenPrep: sink shufflevectors before shifts
On x86, shifting a vector by a scalar is significantly cheaper than shifting a
vector by another fully general vector. Unfortunately, because SelectionDAG
operates on just one basic block at a time, the shufflevector instruction that
reveals whether the right-hand side of a shift *is* really a scalar is often
not visible to CodeGen when it's needed.

This adds another handler to CodeGenPrepare, to sink any useful shufflevector
instructions down to the basic block where they're used, predicated on a target
hook (since on other architectures, doing so will often just introduce extra
real work).

rdar://problem/16063505

llvm-svn: 201655
2014-02-19 10:02:43 +00:00
Evgeniy Stepanov ec931ecf12 Build PIE binaries when cross-compiling to Android.
This change also removes CMAKE_LINK_FLAGS setting that seems to be ignored by cmake.

llvm-svn: 201654
2014-02-19 09:51:22 +00:00
Alexey Samsonov 1715e7a81f Try to revive buildbots after r201620
llvm-svn: 201651
2014-02-19 08:30:55 +00:00
Craig Topper 56f0ed815e Remove special FP opcode maps and instead add enough MRM_XX formats to handle all the FP operations. This increases format by 1 bit, but decreases opcode map by 1 bit so the TSFlags size doesn't change.
llvm-svn: 201649
2014-02-19 08:25:02 +00:00
Craig Topper 8f540272e8 Reduce size of map field in X86 TSFlags since it now requires less bits.
llvm-svn: 201646
2014-02-19 07:29:07 +00:00
Craig Topper 2fb696b214 Put some of the X86 formats in a more logical order.
llvm-svn: 201645
2014-02-19 06:59:13 +00:00
Craig Topper 0d1fd55c13 Remove A6/A7 opcode maps. They can all be handled with a TB map, opcode of 0xa6/0xa7, and adding MRM_C0/MRM_E0 forms. Removes 376K from the disassembler tables.
llvm-svn: 201641
2014-02-19 05:34:21 +00:00
Rui Ueyama c514a8041f llvm-objdump/COFF: Print load configuration table.
Load Configuration Table may contain a pointer to SEH table. This patch is to
print the offset to the table. Printing SEH table contents is a TODO.

The layout of Layout Configuration Table is described in Microsoft PE/COFF
Object File Format Spec, but the table's offset/size descriptions seems to be
totally wrong, at least in revision 8.3 of the spec. I believe the table in
this patch is the correct one.

llvm-svn: 201638
2014-02-19 03:53:11 +00:00
Mingjie Xing 37ebf79f40 Fix a typo in a comment.
llvm-svn: 201633
2014-02-19 03:20:46 +00:00
Saleem Abdulrasool f903a44728 MCAsmParser: support required parameters
This enhances the macro parser to parse and handle parameter qualifications,
which is needed to support required formal parameters in macro definitions.  A
required parameter may not be defaulted (though providing a default value is
accepted with a warning).  This improves GAS compatibility.

Partially addresses PR9248.

llvm-svn: 201630
2014-02-19 03:00:29 +00:00
Saleem Abdulrasool a08585b233 MCAsmParser: change representation of MCAsmMacroParameter
Rather than using std::pair, create a structure to represent the type.  This is
a preliminary refactoring to enable required parameter handling.  Additional
state is needed to indicate required parameters.  This has a minor side effect
of improving readability by providing more accurate names compared to first and
second.

llvm-svn: 201629
2014-02-19 03:00:23 +00:00
Rafael Espindola 8b27c4edc6 Now that llvm always does the right thing with private, use it.
llvm-svn: 201625
2014-02-19 02:08:39 +00:00
Rafael Espindola a8a0d0dabc Use PrivateLinkage now that it is safe.
Now that llvm's codegen knows to use an 'l' prefix when needed, we can just
use PrivateLinkage.

llvm-svn: 201624
2014-02-19 01:46:57 +00:00
Rafael Espindola b9ea63c551 Avoid an infinite cycle with private linkage and -f{data|function}-sections.
When outputting an object we check its section to find its name, but when
looking for the section with -ffunction-section we look for the symbol name.

Break the loop by requesting a name with the private prefix when constructing
the section name. This matches the behavior before r201608.

llvm-svn: 201622
2014-02-19 01:28:30 +00:00
Sean Silva e0ddc731a4 [docs] Clean up some more llvm-gcc stuff
Some references to llvm-gcc were so crusty that I wasn't sure how to
proceed and so I've left them intact.

I also slipped in a quick peephole fix to use a :doc: link instead of
raw HTML link.

llvm-svn: 201619
2014-02-19 00:12:34 +00:00
Sean Silva aa06286d85 [docs] Nuke some references to llvm-gcc
From a cursory look it seems like all the described commandline options
and such apply to clang just fine, but I'd appreciate a second opinion.

llvm-svn: 201616
2014-02-18 23:56:43 +00:00
Rafael Espindola 09dcc6a536 Fix PR18743.
The IR
@foo = private constant i32 42

is valid, but before this patch we would produce an invalid MachO from it. It
was invalid because it would use an L label in a section where the liker needs
the labels in order to atomize it.

One way of fixing it would be to just reject this IR in the backend, but that
would not be very front end friendly.

What this patch does is use an 'l' prefix in sections that we know the linker
requires symbols for atomizing them. This allows frontends to just use
private and not worry about which sections they go to or how the linker handles
them.

One small issue with this strategy is that now a symbol name depends on the
section, which is not available before codegen. This is not a problem in
practice. The reason is that it only happens with private linkage, which will
be ignored by the non codegen users (llvm-nm and llvm-ar).

llvm-svn: 201608
2014-02-18 22:24:57 +00:00
Rafael Espindola ea09c595a6 Rename a DebugLoc variable to DbgLoc and a DataLayout to DL.
This is quiet a bit less confusing now that TargetData was renamed DataLayout.

llvm-svn: 201606
2014-02-18 22:05:46 +00:00
Lang Hames 9b2dc930d7 Consistently check 'IsCode' when allocating sections in RuntimeDyld (via
findOrEmitSection).

Vaidas Gasiunas's patch, r201259, fixed one instance where we were always
allocating sections as text. This patch fixes the remaining buggy call sites.

No test case: This isn't breaking anything that I know of, it's just
inconsistent.

<rdar://problem/15943542>

llvm-svn: 201605
2014-02-18 21:46:39 +00:00
Ana Pazos 7c27a265dc [AArch64] Expanded sin, cos, pow with FP vector types inputs
llvm-svn: 201601
2014-02-18 20:31:05 +00:00
Daniel Sanders 5cc5cd907d [mips] Add support for ELF64-mips and the R_MIPS_32/R_MIPS_64 relocs for it.
Summary:
This fixes several test failures when building LLVM on a MIPS host.

The failures were:
    LLVM :: DebugInfo/enum.ll
    LLVM :: DebugInfo/inlined-arguments.ll
    LLVM :: DebugInfo/member-order.ll
    LLVM :: DebugInfo/namespace.ll
    LLVM :: DebugInfo/template-recursive-void.ll
    LLVM :: DebugInfo/tu-composite.ll
    LLVM :: DebugInfo/two-cus-from-same-file.ll
    LLVM :: Linker/type-unique-simple-a.ll
    LLVM :: Linker/type-unique-simple2.ll

Reviewers: jacksprat, matheusalmeida

Reviewed By: matheusalmeida

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

llvm-svn: 201582
2014-02-18 15:57:52 +00:00
Rafael Espindola 7c68bebb9c Rename some member variables from TD to DL.
TargetData was renamed DataLayout back in r165242.

llvm-svn: 201581
2014-02-18 15:33:12 +00:00
Marshall Clow 8e2403d8df Add myself as owner for libc++
llvm-svn: 201573
2014-02-18 14:03:17 +00:00
Robert Lytton 346e808ec6 XCore target: Handle common linkage
llvm-svn: 201563
2014-02-18 11:21:59 +00:00
Robert Lytton 19ed0d05b8 XCore target: addMemOperand as necessary
BuildMI instructions were not including MachineMemOperand information.
This was discovered by 'SingleSource/Benchmarks/Stanford/Oscar' failing
due to a FrameIndex load incorrectly being hoisted by postra-machine-licm.
No other tests have been found to fail.

llvm-svn: 201562
2014-02-18 11:21:53 +00:00
Robert Lytton af6c256c34 XCore target: Fix llvm.eh.return and EH info register handling
llvm-svn: 201561
2014-02-18 11:21:48 +00:00
Tim Northover d5fe8ce005 Darwin builds: handle different possible form for SDKROOT.
Modifying build_llvm to handle SDKROOT being the name of an SDK rather than a
path. This will still work if SDKROOT is a path.

rdar://problem/15162322

llvm-svn: 201560
2014-02-18 11:20:44 +00:00
Tim Northover f804c178a1 GlobalMerge: move "-global-merge" option to the pass itself.
It's rather odd to have the flag enabling and disabling this pass only affect a
single target.

llvm-svn: 201559
2014-02-18 11:17:29 +00:00