Commit Graph

182372 Commits

Author SHA1 Message Date
Nick Kledzik 1bebb2832e [mach-o] Add support for arm64 (AAarch64)
Most of the changes are in the new file ArchHandler_arm64.cpp.  But a few
things had to be fixed to support 16KB pages (instead of 4KB) which iOS arm64
requires.  In addition the StubInfo struct had to be expanded because
arm64 uses two instruction (ADRP/LDR) to load a global which requires two
relocations.  The other mach-o arches just needed one relocation.

llvm-svn: 217469
2014-09-09 23:52:59 +00:00
David Blaikie d0f103775a Sink PrevCU updating into DwarfUnit::addRange to ensure consistency
So that the two operations in DwarfDebug couldn't get separated (because
I accidentally separated them in some work in progress), put them
together. While we're here, move DwarfUnit::addRange to
DwarfCompileUnit, since it's not relevant to type units.

llvm-svn: 217468
2014-09-09 23:13:01 +00:00
Fariborz Jahanian 6485fe4b07 Objective-C. Under a special flag, -Wcstring-format-directive,
off by default, issue a warning if %s directive is used in
certain CF/NS formatting APIs, to assist user in deprecating
use of such %s in these APIs. rdar://18182443

llvm-svn: 217467
2014-09-09 23:10:54 +00:00
David Blaikie deb174fed5 Remove DwarfDebug::PrevSection, PrevCU is sufficient for handling address range holes.
PrevSection/PrevCU are used to detect holes in the address range of a CU
to ensure the DW_AT_ranges does not include those holes. When we see a
function with no debug info, though it may be in the same range as the
prior and subsequent functions, there should be a gap in the CU's
ranges. By setting PrevCU to null in that case, the range would not be
extended to cover the gap.

llvm-svn: 217466
2014-09-09 22:56:36 +00:00
NAKAMURA Takumi 1ab0cf0e28 SampleProfile.cpp: Prune a stray \param added in r217437. [-Wdocumentation]
llvm-svn: 217465
2014-09-09 22:44:30 +00:00
Zachary Turner f76da3469d Include the correct headers for kinfo_proc on FreeBSD.
llvm-svn: 217464
2014-09-09 22:39:56 +00:00
David Peixotto 9690f3b596 Add -e to test generation script
The -e flag exits the script with a non-zero code if any subcommand
fails. This flag allows us to notice as early as possible if the
test was not properly regenerated using a command like:

$ create_ll.sh t.c && opt < t.ll -polly ...

The above pattern is useful when iteratively developing a test case
to guard against un-noticed syntax errors.

Differential Revision: http://reviews.llvm.org/D5276

llvm-svn: 217463
2014-09-09 22:14:38 +00:00
Zachary Turner 9daf1a6c00 Try to fix the FreeBSD build.
llvm-svn: 217462
2014-09-09 22:11:10 +00:00
Jordan Rose 21933ccdd7 Teach the analyzer that __builtin_assume_aligned returns its first argument.
Patch by Daniel Fahlgren!

llvm-svn: 217461
2014-09-09 21:42:16 +00:00
Zachary Turner 39de311071 Create a HostThread abstraction.
This patch moves creates a thread abstraction that represents a
thread running inside the LLDB process.  This is a replacement for
otherwise using lldb::thread_t, and provides a platform agnostic
interface to managing these threads.

Differential Revision: http://reviews.llvm.org/D5198

Reviewed by: Jim Ingham

llvm-svn: 217460
2014-09-09 20:54:56 +00:00
Jonathan Roelofs 7decae153b Implement post-review comments for r216730
Feedback was 'this could use better comments'.

llvm-svn: 217459
2014-09-09 20:20:52 +00:00
Rafael Espindola 890db27b67 Handle common linkage correctly in the gold plugin.
This is the plugin version of pr20882.

This handles the case of every common symbol being in the IR. We will need some
support from gold to handle the case where some symbols are in ELF and some in
the IR.

llvm-svn: 217458
2014-09-09 20:08:22 +00:00
Sanjay Patel 1191adf4df Add a scheduling model for AMD 16H Jaguar (btver2).
This is a first pass at a scheduling model for Jaguar.
It's structured largely on the existing SandyBridge and SLM sched models.

Using this model, in addition to turning on the PostRA scheduler, results in 
some perf wins on internal and 3rd party benchmarks. There's not much difference 
in LLVM's test-suite benchmarking subset of tests.

Differential Revision: http://reviews.llvm.org/D5229

llvm-svn: 217457
2014-09-09 20:07:07 +00:00
Eric Christopher 5c91d5c17a Add a comment explaining why we're casting the local
variable.

llvm-svn: 217456
2014-09-09 19:26:45 +00:00
Rafael Espindola fe3842cda7 Merge alignment of common GlobalValue.
Fixes pr20882.

llvm-svn: 217455
2014-09-09 17:48:18 +00:00
Ed Maste ea0257a9d9 Use armv6k default for FreeBSD/ARM
Patch by Andrew Turner.

llvm-svn: 217454
2014-09-09 17:47:24 +00:00
Bjorn Steinbrink 3c33150801 Add a test for hoisting instructions with metadata out of then/else blocks
Test for the bug fixed in r215723.

llvm-svn: 217453
2014-09-09 17:10:21 +00:00
Johannes Doerfert 8e95dc657e [Fix] OpenMP parallel loop detection for the isl backend
There was a bug in the IslAst which caused that no more outermost
  parallel loops were detected/checked after a parallel outermost loop
  of depth 1.

  + Test case attached

llvm-svn: 217452
2014-09-09 17:03:54 +00:00
Rafael Espindola 0910605af6 When merging two common GlobalValues, keep the largest.
llvm-svn: 217451
2014-09-09 15:59:12 +00:00
Rafael Espindola 14a41ce802 Make this input file pass the verifier.
This was not noticed before because llvm-link only runs the verifier on the
result and these globals were not present in the result.

llvm-svn: 217450
2014-09-09 15:40:12 +00:00
Rafael Espindola dbb0bd1a42 Move some logic to ModuleLinker::shouldLinkFromSource. NFC.
llvm-svn: 217449
2014-09-09 15:21:00 +00:00
NAKAMURA Takumi bb4fac9050 ScalarOpts/LLVMBuild.txt: Prune unused dependency to IPA.
llvm-svn: 217448
2014-09-09 15:00:38 +00:00
NAKAMURA Takumi 37ffecf06b ScalarOpts/LLVMBuild.txt: Reorder.
llvm-svn: 217447
2014-09-09 15:00:26 +00:00
NAKAMURA Takumi 06eb60a365 LLVMProfileData: Update LLVMBuild.txt corresponding to r217437.
llvm-svn: 217446
2014-09-09 15:00:13 +00:00
Rafael Espindola c83c8d4e74 Fix a use of an undefined value (the linkage).
llvm-svn: 217445
2014-09-09 14:52:27 +00:00
Daniel Jasper 23376259c0 clang-format: [JS] Support regex literals with trailing escaped slash.
Before:
  var regex = / a\//; int i;

After:
  var regex = /a\//;
  int i;

This required pushing the Lexer into its wrapper class and generating a
new one in this specific case. Otherwise, the sequence get lexed as a
//-comment. This is hacky, but I don't know a better way (short of
supporting regex literals in the Lexer).

Pushing the Lexer down seems to make all the call sites simpler.

llvm-svn: 217444
2014-09-09 14:37:39 +00:00
Rafael Espindola 7fc29546f9 Prefer common over weak linkage when linking.
This matches the behavior of ELF linkers.

llvm-svn: 217443
2014-09-09 14:27:09 +00:00
Benjamin Kramer 91ea478d7c clang-apply-replacements: For-rangify.
No functionality change.

llvm-svn: 217442
2014-09-09 14:09:48 +00:00
Rafael Espindola 83a7ddbc9a Simplify ModuleLinker::getLinkageResult. NFC.
llvm-svn: 217441
2014-09-09 14:07:40 +00:00
Benjamin Kramer ab7cefc36b clang-apply-replacements: Deduplicate paths with FileManager.
Bucket replacements by FileEntry instead of path. The same file with
different paths is very common, relative #include paths and symlinks can
easily create them. When that occurs we would apply the fix twice.

llvm-svn: 217440
2014-09-09 13:53:51 +00:00
Benjamin Kramer efffbee024 Tooling: Ignore file names in tooling::deduplicate.
This was horribly broken due to how the sort predicate works. We would
report a conflict for files with a replacement in the same position but
different names if the length differed. Just ignore paths as this is often
what the user wants. Files can occur with different names (due to symlinks
or relative paths) and we don't ever want to do the same edit in one file
twice.

llvm-svn: 217439
2014-09-09 13:53:29 +00:00
Toma Tabacu 2664779b27 [mips] Add assembler support for .set mips0 directive.
Summary:
This directive is used to reset the assembler options to their initial values.
Assembly programmers use it in conjunction with the ".set mipsX" directives.

This patch depends on the .set push/pop directive (http://reviews.llvm.org/D4821).

Contains work done by Matheus Almeida.

Reviewers: dsanders

Reviewed By: dsanders

Differential Revision: http://reviews.llvm.org/D4957

llvm-svn: 217438
2014-09-09 12:52:14 +00:00
Diego Novillo de1ab26f52 Re-factor sample profile reader into lib/ProfileData.
Summary:
This patch moves the profile reading logic out of the Sample Profile
transformation into a generic profile reader facility in
lib/ProfileData.

The intent is to use this new reader to implement a sample profile
reader/writer that can be used to convert sample profiles from external
sources into LLVM.

This first patch introduces no functional changes. It moves the profile
reading code from lib/Transforms/SampleProfile.cpp into
lib/ProfileData/SampleProfReader.cpp.

In subsequent patches I will:

- Add a bitcode format for sample profiles to allow for more efficient
  encoding of the profile.
- Add a writer for both text and bitcode format profiles.
- Add a 'convert' command to llvm-profdata to be able to convert between
  the two (and serve as entry point for other sample profile formats).

Reviewers: bogner, echristo

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5250

llvm-svn: 217437
2014-09-09 12:40:50 +00:00
Daniel Sanders 2b746bc4ae [mips] Move MipsTargetLowering::MipsCC::regSize() to MipsSubtarget::getGPRSizeInBytes()
Summary:
The GPR size is more a property of the subtarget than that of the ABI so move
this information to the MipsSubtarget.

No functional change.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5009

llvm-svn: 217436
2014-09-09 12:11:16 +00:00
Pavel Chupin e6617fc6d4 [x32] Emit callq for CALLpcrel32
Summary:
In AT&T annotation for both x86_64 and x32 calls should be printed as
callq in assembly. It's only a matter of correct mnemonic, object output
is ok.

Test Plan: trivial test added

Reviewers: nadav, dschuff, craig.topper

Subscribers: llvm-commits, zinovy.nis

Differential Revision: http://reviews.llvm.org/D5213

llvm-svn: 217435
2014-09-09 11:54:12 +00:00
Daniel Sanders 4abcfe2cda [mips] Don't cache IsO32 and IsFP64 in MipsTargetLowering::MipsCC
Summary:
Use a MipsSubtarget reference instead.

No functional change.

Reviewers: vmedic

Reviewed By: vmedic

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5008

llvm-svn: 217434
2014-09-09 10:46:48 +00:00
Tim Northover 0b0add517b llvm-objdump: don't crash when __compact_unwind has no relocs.
llvm-svn: 217433
2014-09-09 10:45:06 +00:00
Toma Tabacu 9db22db963 [mips] Add assembler support for .set push/pop directive.
Summary:
These directives are used to save the current assembler options (in the case of ".set push") and restore the previously saved options (in the case of ".set pop").

Contains work done by Matheus Almeida.

Reviewers: dsanders

Reviewed By: dsanders

Differential Revision: http://reviews.llvm.org/D4821

llvm-svn: 217432
2014-09-09 10:15:38 +00:00
Renato Golin 63e27980da ARM: Negative offset support problem
This patch is to permit a negative offset usage for a non frame access.

Patch by Igor Oblakov.

llvm-svn: 217431
2014-09-09 09:57:59 +00:00
Justin Bogner 37aeb2d7c2 llvm-cov: Use ArrayRef::slice (NFC)
llvm-svn: 217430
2014-09-09 09:15:52 +00:00
Eric Christopher 9ad8394e3b Quiet unused variable warning that only occurs
when compiling optimized.

llvm-svn: 217429
2014-09-09 08:57:33 +00:00
Eric Christopher fbb0628dc3 Remove the -Wno-unused-function option. We are clean
with -Wunused-function as far as I can tell.

llvm-svn: 217428
2014-09-09 07:49:15 +00:00
Patrik Hagglund 57d315b7c1 [MachineSinking] Conservatively clear kill flags after coalescing.
This solves the problem of having a kill flag inside a loop
with a definition of the register prior to the loop:

%vreg368<def> ...

Inside loop:

        %vreg520<def> = COPY %vreg368
        %vreg568<def,tied1> = add %vreg341<tied0>, %vreg520<kill>

=> was coalesced into =>

        %vreg568<def,tied1> = add %vreg341<tied0>, %vreg368<kill>

MachineVerifier then complained:
*** Bad machine code: Virtual register killed in block, but needed live out. ***

The kill flag for %vreg368 is incorrect, and is cleared by this patch.

This is similar to the clearing done at the end of
MachineSinking::SinkInstruction().

Patch provided by Jonas Paulsson.

Reviewed by Quentin Colombet and Juergen Ributzka.

llvm-svn: 217427
2014-09-09 07:47:00 +00:00
Eric Christopher 52dc3c8521 Fix comment and remove duplicated -Wno-sign-compare option.
llvm-svn: 217426
2014-09-09 07:11:52 +00:00
Eric Christopher 94c13b5779 Remove unused class variable and its initialization.
llvm-svn: 217425
2014-09-09 06:37:18 +00:00
Eric Christopher fa0f79207c Remove a pair of default values from fully covered switches.
llvm-svn: 217424
2014-09-09 06:35:14 +00:00
Eric Christopher e551d183db Add a newline to the end of the file.
llvm-svn: 217423
2014-09-09 06:32:02 +00:00
Eric Christopher db1c183422 Compare against the right size integer.
llvm-svn: 217422
2014-09-09 06:30:09 +00:00
Eric Christopher 13f091af85 Remove two default cases out of fully covered switches.
llvm-svn: 217421
2014-09-09 06:26:36 +00:00
Eric Christopher 2af274e675 Remove two unused class variables.
llvm-svn: 217420
2014-09-09 06:20:57 +00:00