Commit Graph

171481 Commits

Author SHA1 Message Date
Rui Ueyama 0b8e053ebd Do not use temporary variables to pass them to forEachUndefines.
So that it's obvious that we pass these callbacks only to forEachUndefines.

llvm-svn: 205593
2014-04-04 00:39:37 +00:00
Rafael Espindola 7247546ba3 Add an assert that this is only used with .o files.
I am not sure how to get a relocation in a .dylib, but this function would
return the wrong value if passed one.

llvm-svn: 205592
2014-04-04 00:31:12 +00:00
Reid Kleckner 98a1266218 Put macro redefinition warnings under -Wmacro-redefined
This is consistent with -Wbuiltin-macro-redefined, and puts this common
extension warning under a flag.

Reviewers: rsmith

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

llvm-svn: 205591
2014-04-04 00:17:16 +00:00
Rui Ueyama 8dc9f0a371 Return a vector rather than mutating a given one.
This is cleaner and as efficient as before.

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

llvm-svn: 205590
2014-04-04 00:15:52 +00:00
Rui Ueyama 8bd093b1e5 Rename getInputGraph() and getNextFile().
Seems getSomething() is more common naming scheme than just a noun
to get something, so renaming these members.

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

llvm-svn: 205589
2014-04-04 00:14:04 +00:00
Rafael Espindola 7e91bc9e32 Implement getRelocationAddress for MachO and ET_REL elf files.
With that, fix the symbolizer to work with any ELF file.

llvm-svn: 205588
2014-04-03 23:54:35 +00:00
Rafael Espindola 128b8111d7 Implement macho relocation iterators with section number + relocation number.
This will make it possible to implement getRelocationAddress.

llvm-svn: 205587
2014-04-03 23:51:28 +00:00
Saleem Abdulrasool 905b6d192c ARM: yet another round of ARM test clean ups
llvm-svn: 205586
2014-04-03 23:47:24 +00:00
Jim Grosbach b8bd4a5e2a Tidy up. Space before ':' in range-based for loops.
llvm-svn: 205585
2014-04-03 23:43:26 +00:00
Jim Grosbach bb1af943bb Tidy up. 80 columns.
llvm-svn: 205584
2014-04-03 23:43:22 +00:00
Jim Grosbach 1a59711505 Tidy up. Trailing whitespace.
llvm-svn: 205583
2014-04-03 23:43:18 +00:00
Jim Grosbach e04eb1dc12 Fix typo.
llvm-svn: 205582
2014-04-03 23:43:12 +00:00
Rafael Espindola 0cc9ba116f Fix llvm-objdump crash.
llvm-svn: 205581
2014-04-03 23:20:02 +00:00
Fariborz Jahanian 5ce227971e Turn off -Wmissing-noreturn warning for blocks
as there is no way to attach this attribute to the
block literal. // rdar://16274746

llvm-svn: 205580
2014-04-03 23:06:35 +00:00
Rui Ueyama 1c3486a312 Update comment.
llvm-svn: 205579
2014-04-03 22:58:41 +00:00
Rui Ueyama 71c0202dd0 Minor cleanups.
llvm-svn: 205578
2014-04-03 22:43:42 +00:00
Rafael Espindola 77314aa014 Remove section_rel_empty. Just compare begin() and end() instead.
llvm-svn: 205577
2014-04-03 22:42:22 +00:00
Rui Ueyama 4f010d2f66 Replace a recursion with a loop for speed.
llvm-svn: 205576
2014-04-03 22:36:55 +00:00
Rui Ueyama 450d987e3a Do not check deadStripNever twice.
Atoms with deadStripNever attribute has already been added to the
dead strip root set at end of Resolver::doDefinedAtom, so no need
to check it for each atom again.

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

llvm-svn: 205575
2014-04-03 22:24:40 +00:00
Rui Ueyama 70625fb163 Move code into a helper function.
Move code that always runs after doUndefinedAtom into doUndefinedAtom
for readability.

llvm-svn: 205574
2014-04-03 22:21:59 +00:00
Joerg Sonnenberger fd0d20fae7 Include stdlib.h for getenv when !NDEBUG.
llvm-svn: 205573
2014-04-03 22:00:08 +00:00
Rafael Espindola c498415086 Reuse existing variable.
llvm-svn: 205572
2014-04-03 21:48:41 +00:00
Eli Bendersky bbef172f19 Optimize away unnecessary address casts.
Removes unnecessary casts from non-generic address spaces to the generic address
space for certain code patterns.

Patch by Jingyue Wu.

llvm-svn: 205571
2014-04-03 21:18:25 +00:00
Rui Ueyama 517f0d9b5f Minor cleanup.
llvm-svn: 205570
2014-04-03 21:16:37 +00:00
Rui Ueyama 83e6acc7f2 Simplify two if's.
llvm-svn: 205569
2014-04-03 21:11:22 +00:00
Rui Ueyama fb44f5e278 Fix comments.
llvm-svn: 205568
2014-04-03 21:06:23 +00:00
Rui Ueyama 6aa91cf13d Early return.
llvm-svn: 205567
2014-04-03 21:00:03 +00:00
Rui Ueyama 9457510abf Fix ELFFileNode::resetNextIndex().
ELFLinkingContext has a method addUndefinedAtomsFromSharedLibrary().
The method is being used to skip a shared library within --start-group
and --end-group if it's not the first iteration of the group.

We have the same, incomplete mechanism to skip a shared library within
a group too. That's implemented in ELFFileNode. It's intended to not
return a shared library on the second or further iterations in the
first place. This mechanism is preferred over
addUndefinedAtomsFromSharedLibrary because the policy is implemented
in Input Graph -- that's what Input Graph is for.

This patch removes the dupluicate feature and fixes ELFFileNode.

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

llvm-svn: 205566
2014-04-03 20:54:47 +00:00
Lang Hames cb74fa696b [ARM64] Teach the ARM64DeadRegisterDefinition pass to respect implicit-defs.
When rematerializing through truncates, the coalescer may produce instructions
with dead defs, but live implicit-defs of subregs:
E.g.
  %X1<def,dead> = MOVi64imm 2, %W1<imp-def>; %X1:GPR64, %W1:GPR32

These instructions are live, and their definitions should not be rewritten.

Fixes <rdar://problem/16492408>

llvm-svn: 205565
2014-04-03 20:51:08 +00:00
Rui Ueyama 69fcde8b0a Expand 'auto' that's hard for human to deduce its real type.
llvm-svn: 205564
2014-04-03 20:47:50 +00:00
NAKAMURA Takumi 4dca4d8bbd unconditional-branch.ll is broken for targeting x86_64-cygming. Add an explicit triple for now.
llvm-svn: 205563
2014-04-03 20:40:37 +00:00
Tom Stellard a0150cb6a9 R600: Correct opcode for BFE_INT
Acording to AMD documentation, the correct opcode for
BFE_INT is 0x5, not 0x4

Fixes Arithm/Absdiff.Mat/3 OpenCV test

Patch by: Bruno Jiménez

llvm-svn: 205562
2014-04-03 20:19:29 +00:00
Tom Stellard 7ed0b5235a R600/SI: Lower 64-bit immediates using REG_SEQUENCE
llvm-svn: 205561
2014-04-03 20:19:27 +00:00
NAKAMURA Takumi c5acee0f20 Revert r205551, "Attempt to XFAIL this on mingw and cygwin hosts." It didn't fail on cygming.
That said, it emits errors to the stderr (with exit(0));

  error: failed to compute relocation: IMAGE_REL_I386_SECREL
  error: failed to compute relocation: IMAGE_REL_I386_SECREL
  error: failed to compute relocation: IMAGE_REL_I386_SECREL
  error: failed to compute relocation: IMAGE_REL_I386_SECREL
  error: failed to compute relocation: IMAGE_REL_I386_SECREL
  error: failed to compute relocation: IMAGE_REL_I386_DIR32
  error: failed to compute relocation: IMAGE_REL_I386_SECREL
  error: failed to compute relocation: IMAGE_REL_I386_DIR32
  error: failed to compute relocation: IMAGE_REL_I386_SECREL
  error: failed to compute relocation: IMAGE_REL_I386_SECREL
  error: failed to compute relocation: IMAGE_REL_I386_DIR32

llvm-svn: 205560
2014-04-03 20:08:02 +00:00
NAKAMURA Takumi 8ff866c24e llvm/test/CodeGen/X86/peephole-multiple-folds.ll: Relax expressions to satisfy win32.
llvm-svn: 205559
2014-04-03 20:07:51 +00:00
Rui Ueyama 4469ce6c7b Add empty() to atom_collection.
"x.empty()" is more idiomatic than "x.size() == 0". This patch is to
add such method and use it in LLD.

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

llvm-svn: 205558
2014-04-03 19:51:14 +00:00
Fariborz Jahanian 275542a40e vector [Sema]. Check for proper use of 's' char prefix
(which indicates vector expression is a string of hex
values) instead of crashing in code gen. // rdar://16492792

llvm-svn: 205557
2014-04-03 19:43:01 +00:00
Tobias Grosser 72cebdec2e Add another hint for fixing check-polly errors to get_started.html
Reversed the order in which LD_LIBRARY_PATH is defined in order to make sure the
${CLOOG_INSTALL} prefix is found first.

Contributed-by: Christian Bielert <cib123@googlemail.com>
llvm-svn: 205556
2014-04-03 19:38:38 +00:00
Ed Maste 0fdeb7158e Avoid crash if symbol returns a null name
llvm-svn: 205555
2014-04-03 19:27:39 +00:00
Reid Kleckner d3923aaa6e -fms-extensions: Error out on #pragma init_seg
By ignoring this pragma with a warning, we're essentially miscompiling
the user's program.  WebKit / Blink use this pragma to disable dynamic
initialization and finalization of some static data, and running the
dtors crashes the program.

Error out for now, so that /fallback compiles the TU correctly with
MSVC.  This pragma should be implemented some time this month, and we
can remove this hack.

llvm-svn: 205554
2014-04-03 19:04:24 +00:00
Tobias Grosser d7c5e51627 Note of last Polly phone call
llvm-svn: 205553
2014-04-03 18:56:13 +00:00
Rui Ueyama e8fa7c079e Remove "virtual" and add "override".
Seems clang-modernize couldn't add "override" to nested classes, so
doing it by hand. Also removed unused virtual member function that
is not overriding anything, that seems to have been added by mistake.

llvm-svn: 205552
2014-04-03 18:25:36 +00:00
Eric Christopher 5bdaea85cb Attempt to XFAIL this on mingw and cygwin hosts. The line table on
these is very much off and is more than just the branch
from this bug incorrect:

Address            Line   Column File   ISA Discriminator Flags
------------------ ------ ------ ------ --- ------------- -------------
0x30830a0100000002      3      0      1   0             0  is_stmt
0x30830a0100000008      3      0      1   0             0  is_stmt end_sequence

llvm-svn: 205551
2014-04-03 18:23:52 +00:00
Rui Ueyama 2b2ac91fab Remove "this->".
For most member function calls we do not use "this->" in this file.
Remove the rest for consistency.

llvm-svn: 205550
2014-04-03 18:13:14 +00:00
Tobias Grosser ca61be3ac2 Add a paragraph describing how to configure the python interpreter.
Contributed-by: cib123@googlemail.com
llvm-svn: 205549
2014-04-03 18:12:13 +00:00
Roman Divacky 6150990d59 Revert r205436:
Extend the SSE2 comment lexing to AVX2. Only 16byte align when not on AVX2.

        This provides some 3% speedup when preprocessing gcc.c as a single file.


The patch is wrong, it always uses SSE2, and when I fix that there's no speedup
at all. I am not sure where the 3% came from previously.

--Thi lie, and those below, will be ignored--

M    Lex/Lexer.cpp

llvm-svn: 205548
2014-04-03 18:04:52 +00:00
Eli Bendersky 9966b26dac Fix PR19270 - type mismatch caused by invalid optimization.
Patch by Jingyue Wu.

llvm-svn: 205547
2014-04-03 17:51:58 +00:00
Eric Christopher bc79fddb9a Loosen up check so that we can pass on platforms that generate
slightly more verbose than needed line tables, e.g.:

Address            Line   Column File   ISA Discriminator Flags
------------------ ------ ------ ------ --- ------------- -------------
0x0000000000000000      1      0      1   0             0  is_stmt
0x0000000000000000      1      0      1   0             0  is_stmt prologue_end
0x0000000000000010      2      0      1   0             0  is_stmt
0x0000000000000018      4      0      1   0             0  is_stmt

these should probably be looked at, but it isn't affecting the correctness
of the testcase.

llvm-svn: 205546
2014-04-03 17:40:08 +00:00
Saleem Abdulrasool 717c991923 ARM: update even more tests
More updating of tests to be explicit about the target triple rather than
relying on the default target triple supporting ARM mode.

Indicate to lit that object emission is not yet available for Windows on ARM.

llvm-svn: 205545
2014-04-03 17:35:22 +00:00
Jim Ingham 2f4693aa77 Get "dis -c -s" working again.
pr19324

llvm-svn: 205544
2014-04-03 17:16:17 +00:00