Age | Commit message (Collapse) | Author |
|
This change fixes some of the issues that came with recent merge with LLVM
trunk, and it removes some workarounds that are not needed anymore in the
code. In more details, it:
- removes hack to set ELF::EF_MIPS_PIC flag;
- checks whether __nacl_read_tp is defined in the module, as different
relocation(s) is used to calculate the address;
- marks Mips::JALRPseudo as indirect call in NaCl rewrite pass;
- fixes incorrect merge in MipsAsmPrinter.cpp and MipsMCTargetDesc.cpp.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=2275
TEST= run smoke tests
Review URL: https://codereview.chromium.org/13601014
|
|
This instruction is removed by ExpandGetElementPtr.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3343
TEST=test/NaCl/PNaClABI/instructions.ll + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/14071005
|
|
* Disallow "section" on functions and global variables.
* Disallow "thread_local" on global variables.
* Disallow "gc" on functions.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=2837
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3126
TEST=test/NaCl/PNaClABI/global-attributes.ll + PNaCl toolchain trybots
Review URL: https://codereview.chromium.org/14063007
|
|
I've encountered two uses of va_arg on an empty argument list: NaCl's
open() wrapper (now fixed), and 176.gcc in Spec2k. Although this is
invalid use of va_arg (giving undefined behaviour), it's too awkward
to fix 176.gcc.
Work around this invalid usage by ensuring that the argument list
pointer points to a location on the stack rather than being
uninitialised. va_arg will return undefined values as it does in the
usual native ABIs, rather than crashing.
We could add options for non-strict and strict modes (possibly with a
bounds check), but that's too much complication for now.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3338
TEST=test/Transforms/NaCl/*.ll + ran 176.gcc from Spec2k
Review URL: https://codereview.chromium.org/13510004
|
|
This is one of at least 2 optimizations which introduce non-power-of-two
integer sizes, which we don't want to allow in the PNaCl stable wire format.
This transforms
(icmp pred iM (shl iM %value, N), ConstInt)
-> (icmp pred i(M-N) (trunc %value iM to i(N-N)), (trunc (ConstInt >> N))
and reduces the size of the compare and its operands.
R=mseaborn@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3360
Review URL: https://codereview.chromium.org/13182003
|
|
I noticed this while debugging a runtime cast assertion error.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=2309
TEST=test/NaCl/PNaClABI/*.ll
Review URL: https://codereview.chromium.org/13261012
|
|
We would like to enable the ABI checker as soon as possible so that we
can iterate. The check can be re-enabled when it passes.
FileCheck doesn't allow CHECKs to be commented out so we have to
disrupt them instead.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=2309
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3360
TEST=run ABI checker on NaCl Scons-based tests
Review URL: https://codereview.chromium.org/13375008
|
|
Before, the checker failed with a cast error, when trying to cast the
BasicBlock in a BlockAddress to a Constant.
Fix it so that we at least know which global initializer is being rejected.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=2309
TEST=test/NaCl/PNaClABI/types.ll
Review URL: https://codereview.chromium.org/13392004
|
|
Avoid truncation problems. On Unix, exit(256) is equivalent to exit(0).
BUG=https://code.google.com/p/nativeclient/issues/detail?id=2309
TEST=none
Review URL: https://codereview.chromium.org/13375007
|
|
This allows the ABI checker passes to be used in the same way as
LLVM's "-verify" pass. It allows the checker to be run between other
passes, and without launching pnacl-abicheck as a separate process (so
without the overhead of reading bitcode into memory again).
Make the ABI checker passes produce fatal errors by default, to match
"-verify". This is overridden for pnacl-abicheck's use.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=2309
TEST=tested with pnacl-ld.py changes to use the ABI checker passes
Review URL: https://codereview.chromium.org/13323006
|
|
ExpandTls's use of replaceUsesOfWith() didn't work for PHI nodes
containing the same Constant twice (which needs to work for same or
differing incoming BasicBlocks). The same applies to
ExpandTlsConstantExpr.
I noticed this while implementing ExpandConstantExpr.
Fix this and factor out some common code that all three passes can
use.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=2837
TEST=test/Transforms/NaCl/*.ll
Review URL: https://codereview.chromium.org/13128002
|
|
This only works on instruction attachments for now. Since it is a
ModulePass we can add something to strip NamedMetadata
based on a whitelist, if we want to retain some of that.
It does not touch debug metadata, and leaves -strip-debug to handle that.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3348
Review URL: https://codereview.chromium.org/12844027
|
|
This is a follow-up to:
https://codereview.chromium.org/12683004/
https://codereview.chromium.org/12969002/
And will enable optiomizations for our minimum platform when translating
with default flags. At some point we'll probably want to specialize
further by detecting, e.g. A15 and turning on VFP4, IDIV, etc...
R= dschuff@chromium.org, jvoung@chromium.org
Review URL: https://codereview.chromium.org/13224003
|
|
Also add -q flag for quiet operation; i.e. don't print the
errors, only use the exit status to indicate failure.
R=mseaborn@chromium.org,jvoung@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=2309
Review URL: https://codereview.chromium.org/13117004
|
|
* Ensure that the "byval" attribute is preserved for the fixed
arguments. Before, it was stripped off from function calls but
left in for function definitions, which broke passing struct
arguments (which PNaCl Clang generates as "byval").
* Ensure that function and return attributes are preserved too.
* Handle "byval" variable arguments in calls too by dereferencing the
pointer. These are not yet usable with PNaCl Clang, which does not
allow va_arg on structs (see
https://code.google.com/p/nativeclient/issues/detail?id=2381), but
we might as well make this pass ready to handle this.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3338
TEST=test/Transforms/NaCl/expand-varargs*.ll
Review URL: https://codereview.chromium.org/13100002
|
|
This is similar to the GEP handling in visitGetElementPtr() in
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp.
Once this pass is enabled, it will simplify the language to reduce the
set of constructs that a PNaCl translator needs to handle as part of a
stable wire format for PNaCl.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3343
TEST=test/Transforms/NaCl/expand-getelementptr.ll
Review URL: https://codereview.chromium.org/12849009
|
|
aliases.
R=mseaborn@chromium.org,eliben@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3339
Review URL: https://codereview.chromium.org/13036005
|
|
Expand out these aliases in the ExpandTlsConstantExpr pass.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3347
TEST=test/Transforms/NaCl/expand-tls-constexpr-alias.ll
Review URL: https://codereview.chromium.org/12989011
|
|
This is in the process of being added upstream but the exact location
is still debated and will take some time to settle. In the mean-time
I'm adding it as a localmod so we can run our benchmarks effectively.
Later this should be switched to the upstream implementation (or move
to our own llc-replacement-driver).
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3349
|
|
Once this pass is enabled, it will simplify the language to reduce the
set of constructs that a PNaCl translator needs to handle as part of a
stable wire format for PNaCl.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3338
TEST=test/Transforms/NaCl/expand-varargs.ll
Review URL: https://codereview.chromium.org/12481021
|
|
be kept to pass regression tests.
|
|
Merge Nacl-LLVM work since the upstream merge branched
|
|
|
|
R=sehr@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3302
Review URL: https://codereview.chromium.org/12919017
|
|
This lines them up with the rest of the codebase and will make them work
with statically-linked opt.
R=mseaborn@chromium.org
BUG=none
TEST=existing tests keep working (we don't actually use static opt)
Review URL: https://codereview.chromium.org/12902015
|
|
Once this pass is enabled, it will simplify the language to reduce the
set of constructs that a PNaCl translator needs to handle as part of a
stable wire format for PNaCl.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3337
TEST=test/Transforms/NaCl/expand-constantexpr.ll
Review URL: https://codereview.chromium.org/12792011
|
|
Carryover from https://codereview.chromium.org/12690007
|
|
R=jvoung@chromium.org
BUG= Sandboxed LLC doesn't build correctly anymore without it
Review URL: https://codereview.chromium.org/12432018
|
|
Fix spacing of error output, use OwningPtr everywhere at top level,
fix command line parsing
R=jvoung@chromium.org
BUG=
Review URL: https://codereview.chromium.org/12690007
|
|
This CL adds a standalone tool pnacl-abicheck for checking the ABI validity of a bitcode file.
It also adds a flag pnaclabi-verify to llc to enable the same checking in llc.
It also improves the mechanism for handling and reporting validation errors and uses it in both tools.
R=jvoung@chromium.org,mseaborn@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=2309
Review URL: https://codereview.chromium.org/12449014
|
|
Conflicts:
include/llvm/CodeGen/LexicalScopes.h
include/llvm/MC/MCAsmInfo.h
lib/Linker/LinkArchives.cpp
lib/Linker/LinkItems.cpp
lib/MC/MCAsmInfo.cpp
lib/MC/MCDwarf.cpp
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMSubtarget.cpp
lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp
lib/Target/Mips/MipsAsmPrinter.cpp
lib/Target/Mips/MipsDelaySlotFiller.cpp
lib/Target/Mips/MipsISelDAGToDAG.cpp
lib/Target/Mips/MipsSubtarget.cpp
lib/Target/Mips/MipsSubtarget.h
lib/Target/Mips/MipsTargetObjectFile.cpp
lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp
lib/Target/X86/X86FastISel.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86TargetMachine.cpp
lib/Transforms/CMakeLists.txt
lib/Transforms/LLVMBuild.txt
lib/Transforms/Makefile
test/MC/ARM/arm_instructions.s
test/MC/X86/AlignedBundling/pad-align-to-bundle-end.s
|
|
This will take the default flags and append any extra flags.
For now, this is only intended to support -O in the browser,
and perhaps -mcpu=.*, -mattr=. We move the tuning parameters
like -mcpu out of the default, so that a user does not end up
setting the -mcpu more than once (which is disallowed).
What does go into the default is -mtriple, which we may want
to hard-code into the build somehow (but it's not yet clear
how to do that cleanly). That way, a user does not need
to specify that portion. We also hardcode the -sfi-* flags.
Sort of tested by: https://codereview.chromium.org/12459004/
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3325
Review URL: https://codereview.chromium.org/12490004
|
|
Saves about 58KB. These LinkAll{CodeGen/AsmWriter}Components.h headers
are only #included by LLC/LLI. We could create our own version of these
if we want to create our own version of LLC, but that could make it
harder to notice when the header changes.
BUG= http://code.google.com/p/nativeclient/issues/detail?id=1222
Review URL: https://codereview.chromium.org/12334018
|
|
This should more generally prevent negative values in index registers, but
still allow most uses of this address mode for structure references.
R=sehr@chromium.org
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3302
Review URL: https://codereview.chromium.org/12389054
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176253 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Shadow checks are disabled and memory loads always produce fully initialized
values in functions that don't have a sanitize_memory attribute. Value and
argument shadow is propagated as usual.
This change also updates blacklist behaviour to match the above.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176247 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Most of the tests that behave differently on llvm-arm-linux buildbot
did so becase the triple wasn't set correctly to armv5, so we can
revert most of the special behaviour added previously. Some tests
still need the special treatment, though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176243 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176240 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Patch by Journeyer J. Joh!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176235 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
code/condition enums.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176228 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
infinite loop by constantly trying
to create the parent path.
This can happen if the path is a relative filename and the current directory was removed.
Thanks to Daniel D. for the hint in fixing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176226 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
This problem is exposed by r171325 which is already reverted. It is rather
hard to fabricate a testing case without it.
r171325 should *NOT* be resurrected as it has a potential problem although
this problem dosen't directly contribute to PR14988.
The bug is tracked by:
- rdar://13063553, and
- http://llvm.org/bugs/show_bug.cgi?id=14988
Thank Arnold for coming up a better solution to this problem. After
comparing this solution and my original proposal, I decided to ditch mine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176225 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
a few lines above.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176224 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176223 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176222 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
definition DIE (TAG_variable), and put AT_MIPS_linkage_name to TAG_member when
DarwinGDBCompat is true.
Darwin GDB needs AT_MIPS_linkage_name at both places to work.
Follow-up patch to r176143.
rdar://problem/13291234
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176220 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176218 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
operations to increment the counters.
This patch disables the counters on non-debug builds. This reduces the runtime of SelectionDAGISel::SelectCodeCommon by ~5%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176214 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
Test case is missing due to it not being reachable through the current tools
but out of tree code such as the sample at
http://llvm.org/docs/tutorial/LangImpl4.html
Patch by Peng Cheng <gm4cheng@gmail.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176213 91177308-0d34-0410-b5e6-96231b3b80d8
|
|
rdar://13306723
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176212 91177308-0d34-0410-b5e6-96231b3b80d8
|