| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The force_align_arg_pointer attribute was using a hardcoded 16-byte
alignment value which in combination with -mstack-alignment=32 (or
larger) would produce a misaligned stack which could result in crashes
when accessing stack buffers using aligned AVX load/store instructions.
Fix the issue by using the "stackrealign" function attribute instead
of using a hardcoded 16-byte alignment.
Patch By: Gramner
Differential Revision: https://reviews.llvm.org/D45812
llvm-svn: 330331
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This attribute is useful in OS development when we jump from 32 to 64 bit
code and expect that 64bit function forces correct stack alignment.
Related discussion: http://lists.llvm.org/pipermail/cfe-dev/2017-June/054358.html
Patch By: anatol.pomozov (anatol.pomozov@gmail.com)
Differential Revision:https://reviews.llvm.org/D36272
llvm-svn: 312173
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
attributes.
These patches don't work because we can't currently access the parameter
information in a reliable way when building attributes. I thought this
would be relatively straightforward to fix, but it seems not to be the
case. Fixing this will requrie a substantial re-plumbing of machinery to
allow attributes to be handled in this location, and several other fixes
to the attribute machinery should probably be made at the same time. All
of this will make the patch .... substantially more complicated.
Reverting for now as there are active miscompiles caused by the current
version.
llvm-svn: 298695
|
|
|
|
|
|
|
|
|
|
| |
explaining why we have to ignore errors here even though in other parts
of codegen we can be more strict with builtins.
Also add a test case based on the code in a TSan test that found this
issue.
llvm-svn: 298494
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Much to my surprise, '-disable-llvm-optzns' which I thought was the
magical flag I wanted to get at the raw LLVM IR coming out of Clang
deosn't do that. It still runs some passes over the IR. I don't want
that, I really want the *raw* IR coming out of Clang and I strongly
suspect everyone else using it is in the same camp.
There is actually a flag that does what I want that I didn't know about
called '-disable-llvm-passes'. I suspect many others don't know about it
either. It both does what I want and is much simpler.
This removes the confusing version and makes that spelling of the flag
an alias for '-disable-llvm-passes'. I've also moved everything in Clang
to use the 'passes' spelling as it seems both more accurate (*all* LLVM
passes are disabled, not just optimizations) and much easier to remember
and spell correctly.
This is part of simplifying how Clang drives LLVM to make it cleaner to
wire up to the new pass manager.
Differential Revision: https://reviews.llvm.org/D28047
llvm-svn: 290392
|
|
|
|
|
|
|
| |
This reverts commit r278050. It depends on r278048, which will be
reverted.
llvm-svn: 278052
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Based on a patch by Michael Mueller.
This attribute specifies that a function can be hooked or patched. This
mechanism was originally devised by Microsoft for hotpatching their
binaries (which they're constantly updating to stay ahead of crackers,
script kiddies, and other ne'er-do-wells on the Internet), but it's now
commonly abused by Windows programs that want to hook API functions. It
is for this reason that this attribute was added to GCC--hence the name,
`ms_hook_prologue`.
Depends on D19908.
Reviewers: rnk, aaron.ballman
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D19909
llvm-svn: 278050
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
beyond value/repair
Several of these tests (the two deleted, and the one removal edit) were
relying on the optimizer to collapse things to test some frontend
feature. The tests were really old and features seemed amply covered by
other parts of the test suite, so I just removed them.
If anyone thinks they're valuable enough to keep/fix, we can play around
with that, for sure.
(inspired by r252872)
llvm-svn: 253114
|
|
|
|
|
|
| |
FunctionAttrs has just been taught how to infer 'norecurse'. Update clang tests for LLVM r252871.
llvm-svn: 252872
|
|
|
|
|
|
|
|
|
|
| |
Revert "Update cxx-irgen.cpp test to allow signext in alwaysinline functions."
Revert "[CodeGen] Remove wrapper-free always_inline functions from COMDATs"
Revert "Always_inline codegen rewrite."
Reason for revert: PR24793.
llvm-svn: 247620
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current implementation may end up emitting an undefined reference for
an "inline __attribute__((always_inline))" function by generating an
"available_externally alwaysinline" IR function for it and then failing to
inline all the calls. This happens when a call to such function is in dead
code. As the inliner is an SCC pass, it does not process dead code.
Libc++ relies on the compiler never emitting such undefined reference.
With this patch, we emit a pair of
1. internal alwaysinline definition (called F.alwaysinline)
2a. A stub F() { musttail call F.alwaysinline }
-- or, depending on the linkage --
2b. A declaration of F.
The frontend ensures that F.inlinefunction is only used for direct
calls, and the stub is used for everything else (taking the address of
the function, really). Declaration (2b) is emitted in the case when
"inline" is meant for inlining only (like __gnu_inline__ and some
other cases).
This approach, among other nice properties, ensures that alwaysinline
functions are always internal, making it impossible for a direct call
to such function to produce an undefined symbol reference.
This patch is based on ideas by Chandler Carruth and Richard Smith.
llvm-svn: 247494
|
|
|
|
|
|
|
|
|
| |
Revert "Always_inline codegen rewrite."
Breaks gdb & lldb tests.
Breaks on Fedora 22 x86_64.
llvm-svn: 247491
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current implementation may end up emitting an undefined reference for
an "inline __attribute__((always_inline))" function by generating an
"available_externally alwaysinline" IR function for it and then failing to
inline all the calls. This happens when a call to such function is in dead
code. As the inliner is an SCC pass, it does not process dead code.
Libc++ relies on the compiler never emitting such undefined reference.
With this patch, we emit a pair of
1. internal alwaysinline definition (called F.alwaysinline)
2a. A stub F() { musttail call F.alwaysinline }
-- or, depending on the linkage --
2b. A declaration of F.
The frontend ensures that F.inlinefunction is only used for direct
calls, and the stub is used for everything else (taking the address of
the function, really). Declaration (2b) is emitted in the case when
"inline" is meant for inlining only (like __gnu_inline__ and some
other cases).
This approach, among other nice properties, ensures that alwaysinline
functions are always internal, making it impossible for a direct call
to such function to produce an undefined symbol reference.
This patch is based on ideas by Chandler Carruth and Richard Smith.
llvm-svn: 247465
|
|
|
|
|
|
|
|
|
| |
This is a partial revert of 183015.
By not recognizing things like _setjmp we lose (returns_twice) attribute on
them, which leads to incorrect code generation.
Fixes PR16138.
llvm-svn: 206362
|
|
|
|
|
|
| |
tests fail.
llvm-svn: 188447
|
|
|
|
|
|
| |
These can be easily queried by the back-end.
llvm-svn: 176304
|
|
|
|
| |
llvm-svn: 176145
|
|
|
|
| |
llvm-svn: 176135
|
|
|
|
|
|
|
|
| |
This reverts commit 176009.
The commit is a likely cause of several buildbot failures.
llvm-svn: 176044
|
|
|
|
|
|
|
| |
This is an ongoing process. Any command line option which a back-end cares about
should be added here.
llvm-svn: 176009
|
|
|
|
| |
llvm-svn: 175921
|
|
|
|
|
|
| |
attributes on the call/invoke instructions.
llvm-svn: 175878
|
|
|
|
|
|
| |
function attributes.
llvm-svn: 175606
|
|
|
|
|
|
|
| |
This update coincides with r174110. That change ordered the attributes
alphabetically.
llvm-svn: 174111
|
|
|
|
|
|
| |
an attribute for consistency with our other noreturn mechanisms.
llvm-svn: 173898
|
|
|
|
|
|
| |
the same behavior of gcc by keeping the attribute out of the function type.
llvm-svn: 141803
|
|
|
|
| |
llvm-svn: 141002
|
|
|
|
|
|
|
| |
marked 'force_align_arg_pointer'. Almost there; now all I need to do is finish
up the backend.
llvm-svn: 96100
|
|
|
|
|
|
|
|
|
| |
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).
llvm-svn: 91446
|
|
|
|
| |
llvm-svn: 85278
|
|
|
|
| |
llvm-svn: 85277
|
|
|
|
| |
llvm-svn: 76638
|
|
|
|
|
|
|
|
| |
to go back and clean up existing uses of the bitcasted function. This
is not just an optimization: it is required for correctness to get
always inline functions to work, see testcases in function-attributes.c.
llvm-svn: 70971
|
|
|
|
| |
llvm-svn: 70786
|
|
|
|
|
|
| |
not in c89 mode).
llvm-svn: 69032
|
|
|
|
| |
llvm-svn: 68833
|
|
|
|
|
|
| |
Tests and drivers updated, still need to shuffle dirs.
llvm-svn: 67602
|
|
|
|
|
|
|
| |
code) when calling noreturn functions; general expression emission
isn't ready to do the right thing in all cases.
llvm-svn: 65473
|
|
|
|
|
|
| |
- Remove an unused variant of EmitCallExpr overload.
llvm-svn: 65130
|
|
|
|
|
|
| |
types.
llvm-svn: 63669
|
|
|
|
| |
llvm-svn: 58304
|
|
|
|
| |
llvm-svn: 56842
|
|
|
|
| |
llvm-svn: 56734
|
|
- <rdar://problem/6156739>
llvm-svn: 55815
|