Commit Graph

137327 Commits

Author SHA1 Message Date
Nico Weber 3ad723ca2e [ms] Make mangleIntegerLiteral less aware of exact type of the literal.
Integer literal mangling does not actually depend on exact type of the literal.
This will simplify calling mangleIntegerLiteral when literal type is not known,
for example, when sizes or offsets are mangled as integer literals.

Also, call mangleNumber instead of directly printing mangled values of 0/1, to
avoid this knowledge from being in multiple places.

Patch from Evgeny Eltsin!

llvm-svn: 167878
2012-11-13 22:09:44 +00:00
Michael J. Spencer f1aef758a7 [MC][COFF] Emit weak symbols to the correct section. Patch by Dmitry Puzirev!
llvm-svn: 167877
2012-11-13 22:04:09 +00:00
NAKAMURA Takumi 472264c6b4 Revert r167836, "llvm/test/Other/close-stderr.ll: Mark it as XFAIL:mingw32 for now.", corresponding to r167849.
llvm-svn: 167876
2012-11-13 21:57:42 +00:00
Ulrich Weigand 2299f6adca Add test case to verify correct relocs being generated for
TLS symbols on PowerPC using the integrated assembler.

llvm-svn: 167875
2012-11-13 21:53:43 +00:00
Hemant Kulkarni 87dbac00a9 Add program header emission to ELF writer. This patch also rearranges sections for efficient memory utilization
llvm-svn: 167874
2012-11-13 21:34:45 +00:00
Kaelyn Uhrain 1137001938 For classes that have the warn_unused_result attribute, don't apply the
attribute to the class' methods even when they return an instance of the
class (e.g. assignment operators).

llvm-svn: 167873
2012-11-13 21:23:31 +00:00
Shankar Easwaran 6657517f37 numerically sort the symbols, so that the testcase result is uniform
llvm-svn: 167872
2012-11-13 21:01:11 +00:00
Shankar Easwaran 85bb045106 changes after mspencer reviews in phabricator
llvm-svn: 167871
2012-11-13 20:34:55 +00:00
Michael J. Spencer a5d22811af Fix style violations.
llvm-svn: 167869
2012-11-13 19:58:58 +00:00
Anna Zaks a14c1d09f6 [analyzer] Address Jordan's code review for r167813.
This simplifies logic, fixes a bug, and adds a test case.
Thanks Jordan!

llvm-svn: 167868
2012-11-13 19:47:40 +00:00
Daniel Dunbar 38d2284eeb llvm-nm: Make sort more stable when symbol names are equal.
llvm-svn: 167866
2012-11-13 19:39:55 +00:00
Ulrich Weigand 8557850053 Add (some) PowerPC TLS relocation types to ELF.h and
generate them from PPCELFObjectWriter::getRelocTypeInner
as appropriate.

llvm-svn: 167864
2012-11-13 19:24:36 +00:00
Ulrich Weigand 0f79500af5 Fix wrong PowerPC instruction opcodes for:
- lwaux
 - lhzux
 - stbu

llvm-svn: 167863
2012-11-13 19:21:31 +00:00
Ulrich Weigand a82389b3d0 Fix wrong PowerPC instruction encodings due to
operand field name mismatches in:
 - AForm_3  (fmul, fmuls)
 - XFXForm_5 (mtcrf)
 - XFLForm (mtfsf)

llvm-svn: 167862
2012-11-13 19:19:46 +00:00
Ulrich Weigand 0117718580 Fix instruction encoding for "bd(n)z" on PowerPC,
by using a new instruction format BForm_1.

llvm-svn: 167861
2012-11-13 19:15:52 +00:00
Ulrich Weigand 84ee76acfe Fix instruction encoding for "isel" on PowerPC,
using a new instruction format AForm_4.

llvm-svn: 167860
2012-11-13 19:14:19 +00:00
Manman Ren 0f3240d3a7 X86: when constructing VZEXT_LOAD from other loads, makes sure its output
chain is correctly setup.

As an example, if the original load must happen before later stores, we need
to make sure the constructed VZEXT_LOAD is constrained to be before the stores.

rdar://12684358

llvm-svn: 167859
2012-11-13 19:13:05 +00:00
Daniel Dunbar cf3f2c49ea Revert r167801, "[preprocessor] When #including something that contributes no
tokens at all,". This change broke External/Nurbs in LLVM test-suite.

llvm-svn: 167858
2012-11-13 19:12:37 +00:00
Jim Ingham e9322ce61a Revision of the patch from Andrew Kaylor <andrew.kaylor@intel.com> to prevent missing an event added in WaitForEventsInternal, narrowing the time in which we are not accepting new events. Also, made everything that was protected private, since there really isn't any good reason why subclasses would have to muck with the listener internals.
llvm-svn: 167857
2012-11-13 19:09:45 +00:00
David Blaikie 3403feb1d0 Simplify function try/catch scope handling.
Based on post-commit review feedback for r167766 by Richard Smith.

llvm-svn: 167856
2012-11-13 18:51:45 +00:00
Ulrich Weigand 3946877f88 Do not consider a machine instruction that uses and defines the same
physical register as candidate for common subexpression elimination
in MachineCSE.

This fixes a bug on PowerPC in MultiSource/Applications/oggenc/oggenc
caused by MachineCSE invalidly merging two separate DYNALLOC insns.

llvm-svn: 167855
2012-11-13 18:40:58 +00:00
Shankar Easwaran 70b4dcfbcd Adding support to resolve symbols with archive libraries in lld
llvm-svn: 167854
2012-11-13 18:39:10 +00:00
Shankar Easwaran 15b28be9da Adding changes to support GNU style archive library reading
llvm-svn: 167853
2012-11-13 18:38:42 +00:00
Shankar Easwaran b1a3c0d428 Adding convenience function to ELF Header
llvm-svn: 167852
2012-11-13 18:26:22 +00:00
Andrew Trick 449c7ad7d7 Fix -join-splitedges: my previous "cleanup" broke it.
Working on reducing unit tests.
This won't be enabled unless a subtarget enables misched.

llvm-svn: 167851
2012-11-13 17:37:46 +00:00
Daniel Jasper a05bb6bd70 Fix AST-matcher descendant visiting for Types, TypeLocs and NestedNamespecifierLocs.
The RecursiveASTVisitor assumes that any given Traverse-method can be called with a NULL-node. So the subclass needs to handle these appropriately.

llvm-svn: 167850
2012-11-13 17:14:11 +00:00
Chad Rosier 379574fd20 Revert 167755/167760. We don't want to emit crash diagnostics on command-line syntax errors.
llvm-svn: 167849
2012-11-13 16:42:19 +00:00
Howard Hinnant fe4d464f52 Update CREDIT.TXT
llvm-svn: 167847
2012-11-13 15:57:18 +00:00
Benjamin Kramer 76db2907b0 This patch makes the behavior of clang consistent with the behavior of gcc 4.6 in cases where both -fPIC and -fPIE is used.
- Separately check if -fPIE was specified in the command line and define both __PIC__ and __PIE__ when -fPIE is used. We need to check this separately because -fPIE will infer -fPIC even if its not explicitly used.
- Fixed existing tests.
- Added new tests for cases where both -fPIC and -fPIE is used.

Author: Tareq A. Siraj <tareq.a.siraj@intel.com>
Fixes: PR13221
Review: http://llvm-reviews.chandlerc.com/D94
llvm-svn: 167846
2012-11-13 15:32:35 +00:00
NAKAMURA Takumi 4fa2bd8c7a llvm/test/Other/close-stderr.ll: Mark it as XFAIL:mingw32 for now.
On MSYS, 70 is not seen, but 1.

r127726 should be reworked. Candidate options are;

  1) Use not exit(70), but _exit(70), in report_fatal_error().
  2) Return with _exit(70) in ~raw_ostream().

llvm-svn: 167836
2012-11-13 15:03:33 +00:00
Dmitry Vyukov 6d67d3b0ee tsan: remove unused const
llvm-svn: 167835
2012-11-13 14:13:21 +00:00
Dmitry Vyukov 041eaf976c tsan: better function names
llvm-svn: 167834
2012-11-13 14:05:58 +00:00
Alexey Samsonov b8a5f99bee [TSan] Add output test for write under reader lock
llvm-svn: 167833
2012-11-13 14:05:02 +00:00
Dmitry Vyukov dcba4d1288 tsan: fix stats collection
llvm-svn: 167832
2012-11-13 13:53:43 +00:00
Duncan Sands b8d3caf65a Codegen support for arbitrary vector getelementptrs.
llvm-svn: 167830
2012-11-13 13:01:58 +00:00
Duncan Sands db698d8a8a Fix the instcombine GEP index widening transform to work correctly for vector
getelementptrs.

llvm-svn: 167829
2012-11-13 13:01:00 +00:00
Duncan Sands e6beec6765 Relax the restrictions on vector of pointer types, and vector getelementptr.
Previously in a vector of pointers, the pointer couldn't be any pointer type,
it had to be a pointer to an integer or floating point type.  This is a hassle
for dragonegg because the GCC vectorizer happily produces vectors of pointers
where the pointer is a pointer to a struct or whatever.  Vector getelementptr
was restricted to just one index, but now that vectors of pointers can have
any pointer type it is more natural to allow arbitrary vector getelementptrs.
There is however the issue of struct GEPs, where if each lane chose different
struct fields then from that point on each lane will be working down into
unrelated types.  This seems like too much pain for too little gain, so when
you have a vector struct index all the elements are required to be the same.

llvm-svn: 167828
2012-11-13 12:59:33 +00:00
Benjamin Kramer 3eb156306a DependenceAnalysis: Print all dependency pairs when dumping. Update all testcases.
Part of a patch by Preston Briggs.

llvm-svn: 167827
2012-11-13 12:12:02 +00:00
Andrew Trick 108c88c5b7 misched: Allow subtargets to enable misched and dependent options.
This allows me to begin enabling (or backing out) misched by default
for one subtarget at a time. To run misched we typically want to:
- Disable SelectionDAG scheduling (use the source order scheduler)
- Enable more aggressive coalescing (until we decide to always run the coalescer this way)
- Enable MachineScheduler pass itself.

Disabling PostRA sched may follow for some subtargets.

llvm-svn: 167826
2012-11-13 08:47:29 +00:00
Andrew Trick 40534fe9a5 Added RegisterCoalescer support for joining global copies first.
This adds the -join-globalcopies option which can be enabled by
default once misched is also enabled.

Ideally, the register coalescer would be able to split local live
ranges in a way that produces copies that can be easily resolved by
the scheduler. Until then, this heuristic should be good enough to at
least allow the scheduler to run after coalescing.

llvm-svn: 167825
2012-11-13 08:47:25 +00:00
Alexey Samsonov 2906117857 [ASan] now we don't need llvm_obj_root to access llvm-symbolizer tool
llvm-svn: 167823
2012-11-13 07:55:16 +00:00
Alexey Samsonov cfd662f279 Figure out <size> argument of llvm.lifetime intrinsics at the moment they are created (during function inlining)
llvm-svn: 167821
2012-11-13 07:15:32 +00:00
Jyotsna Verma ccfd77ef90 Test commit.
Add a blank line.

llvm-svn: 167819
2012-11-13 06:31:55 +00:00
Nico Weber 7cc28804e2 UCNs in char literals are done (in LiteralSupport), remove FIXME. Expand UCN FIXME in LexNumericConstant.
llvm-svn: 167818
2012-11-13 06:25:15 +00:00
Hal Finkel b51bdd20d3 BBVectorize: Remove temporary assert used for debugging
llvm-svn: 167817
2012-11-13 05:54:54 +00:00
Argyrios Kyrtzidis 243d82345d Copy the decls returned by DeclContext::lookup_result to a
new container so we can safely iterate over them.

The container holding the lookup decls can under certain conditions
be changed while iterating (e.g. because of deserialization).

llvm-svn: 167816
2012-11-13 05:07:23 +00:00
Meador Inge 193e035b9c instcombine: Migrate math library call simplifications
This patch migrates the math library call simplifications from the
simplify-libcalls pass into the instcombine library call simplifier.

I have typically migrated just one simplifier at a time, but the math
simplifiers are interdependent because:

   1. CosOpt, PowOpt, and Exp2Opt all depend on UnaryDoubleFPOpt.
   2. CosOpt, PowOpt, Exp2Opt, and UnaryDoubleFPOpt all depend on
      the option -enable-double-float-shrink.

These two factors made migrating each of these simplifiers individually
more of a pain than it would be worth.  So, I migrated them all together.

llvm-svn: 167815
2012-11-13 04:16:17 +00:00
Anna Zaks de13814a37 Add a test that shows that reporting a leak after failure to free is
tricky.

llvm-svn: 167814
2012-11-13 03:34:49 +00:00
Anna Zaks 67291b90f9 Fix a Malloc Checker FP by tracking return values from initWithCharacter
and other functions.

When these functions return null, the pointer is not freed by
them/ownership is not transfered. So we should allow the user to free
the pointer by calling another function when the return value is NULL.

llvm-svn: 167813
2012-11-13 03:18:01 +00:00
Evan Cheng ab72f9763f Remove virtual keyword for two routines that should never be overridden.
llvm-svn: 167812
2012-11-13 03:14:16 +00:00