chrib updated this revision to Diff 113846.
chrib added a comment.
Herald added a subscriber: kristof.beyls.
Rebase and cleanup NeedsUnwindTable for be variants.
https://reviews.llvm.org/D31140
Files:
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h
Index: lib/CodeGen/CodeGenModu
efriedma added a comment.
If you want to follow what we do for x86-64 on ARM, you should be doing this in
the driver, not codegen (grep for IsUnwindTablesDefault).
https://reviews.llvm.org/D31140
___
cfe-commits mailing list
cfe-commits@lists.llvm.
chrib planned changes to this revision.
chrib added a comment.
Yes, I also tried to look into this direction, but I did not found a clean way
from the driver to emit the attribute based on codegen options. Also
unwind-tables must not be the default. (for C this is what I want to
eliminate). In
chrib added a comment.
forgot to give the motivating figure. this brings a code size reduction of 9.5
% (geomean of text sections sizes) on coremarkpro -Oz for cortex-m3 eabi
https://reviews.llvm.org/D31140
___
cfe-commits mailing list
cfe-commits
efriedma added a comment.
Oh, you don't want to emit them by default. :)
I'm not sure what you're trying to do here... there are three possibilities:
1. The function could have an exception thrown through it, so we need an unwind
table.
2. The function can't have an exception thrown through it,
chrib updated this revision to Diff 114589.
chrib added a comment.
Hello Eli,
You were right, using IsUnwindTablesDefault is the correct way to abstract the
need for UnwindTables. I missed the relationship between the driver
munwind-table and GodeGenOpts.UnwindTables use in Codegen.
Here is a
chrib updated this revision to Diff 135603.
chrib added a comment.
Herald added a subscriber: mehdi_amini.
hello, realizing that this has been stuck for a while now. did I answer all
the concerns ? rebased patch,
gentle ping :-)
many thanks,
Christian
https://reviews.llvm.org/D31140
Files:
chrib updated this revision to Diff 135610.
chrib added a comment.
damn it last diff was the llvm part (https://reviews.llvm.org/D31139). Here is
the clang part.
sorry for the noise, still not experienced with Phabricator.
https://reviews.llvm.org/D31140
Files:
include/clang/Driver/ToolChai
efriedma added inline comments.
Comment at: lib/Driver/ToolChains/BareMetal.cpp:61
+bool BareMetal::IsUnwindTablesDefault(const ArgList &Args) const {
+ return getDriver().CCCIsCXX();
+}
This still seems weird. In most situations, I would expect you want the sa
chrib added a comment.
OK, we can refine so that unwind-table is also not generated for C++
-fno-exceptions.
To summarize this gives or C++ :
|| Unwind (table) | Exceptions (can throw) |
| default| Y| Y |
| fno-unwind | N
chrib updated this revision to Diff 115176.
chrib added a comment.
Update IsUnwindTablesDefault to test fno-exceptions. (see Darwin.cpp)
Add comments.
https://reviews.llvm.org/D31140
Files:
lib/Driver/ToolChains/BareMetal.cpp
lib/Driver/ToolChains/BareMetal.h
Index: lib/Driver/ToolChains
efriedma added a comment.
I would rather not make ARM baremetal do something different from every other
target...
On Linux, for most targets, we don't add the uwtable attribute by default;
without the uwtable attribute, non-ARM backends (e.g. aarch64) only emit tables
for functions which might
chrib added a comment.
oops yes of course. I forgot some bits while switching from testing the arch to
testing the platform.
indeed --target=arm-none-linux-gnueabihf lost its unwind info in c++.
Surprisingly not caught by the llvm tests, will add some.
thanks
https://reviews.llvm.org/D31140
chrib added a comment.
Hello,
I didn't find an easy way factorize the change in IsUnwindTableDefault to
support the multiple ARM toolchains. After a quick check in Triple::arm in
Driver/Toochains, many seem impacted (excepted NetBSD and Darwin that uses
DwarfCFI or SJLG). So here is an attemp
chrib updated this revision to Diff 116176.
chrib added a comment.
Herald added a subscriber: javed.absar.
Changes since last revision:
- Check IsUnwindTablesDefault in ARM Toolchains that support
ExceptionHandling::ARM (not Darwin, NetBSD)
- Check input type with driver mode for C++ mode.
- Add
chrib updated this revision to Diff 117139.
chrib added a comment.
Hello,
I realized that testing CCCisCXX for IsUnwindTablesDefault was not really good
and useless here, because we cannot treat C as C++ mode. In fact only the file
type matters, as seen in the tests.
So I'd like to amend my pr
ahatanak added a comment.
Is it possible to enable cantunwind for one function and enable for another? If
so, does this have to be a function attribute?
https://reviews.llvm.org/D31140
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://
chrib added a comment.
Yes we can enable cantunwind with the nothrow gcc attribute when exceptions are
enabled
Forcing it in exceptions are not enabled (e.g for attribute cleanup) would
require -funwind-tables at function level anyway
So the flag should work, but conceptually I think you are ri
chrib updated this revision to Diff 93631.
chrib added a dependency: D31139: [LLVMbugs] [Bug 18710] Only generate
.ARM.exidx and .ARM.extab when needed with EHABI.
chrib added a comment.
1. Updating https://reviews.llvm.org/D31140: [LLVMbugs] [Bug 18710] Only
generate .ARM.exidx and .ARM.extab
chrib updated this revision to Diff 94329.
chrib added a comment.
- NeedsUnwindTable check thumb arch
https://reviews.llvm.org/D31140
Files:
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h
Index: lib/CodeGen/CodeGenModule.h
===
jroelofs added a comment.
Can you clarify the logic here? It's my understanding that:
`-fno-exceptions` does *not* imply `-fno-unwind-tables`
however:
`-fno-unwind-tables` *does* imply that exceptions cannot be used on targets
that require the tables to do unwinding.
https://reviews.llvm.org
chrib added a comment.
In https://reviews.llvm.org/D31140#706411, @jroelofs wrote:
> Can you clarify the logic here? It's my understanding that:
>
> `-fno-exceptions` does *not* imply `-fno-unwind-tables`
>
> however:
>
> `-fno-unwind-tables` *does* imply that exceptions cannot be used on targets
Just to add to our comments bellow,
One experiment I did is to use the nounwind/uwtable combination to
achieve what we need.
e.g:
nounwind= emit nothing
nounwind uwtable = emit the .exidx .extab section with the CANTUNWIND
However I gave that up because of tests legacy. e.g
Hi Jon
Le 03/21/2017 à 09:11 PM, Jonathan Roelofs a écrit :
On 3/21/17 1:53 PM, Christian Bruel via Phabricator wrote:
chrib added a comment.
In https://reviews.llvm.org/D31140#706411, @jroelofs wrote:
Can you clarify the logic here? It's my understanding that:
`-fno-exceptions` does *no
On 3/21/17 1:53 PM, Christian Bruel via Phabricator wrote:
chrib added a comment.
In https://reviews.llvm.org/D31140#706411, @jroelofs wrote:
Can you clarify the logic here? It's my understanding that:
`-fno-exceptions` does *not* imply `-fno-unwind-tables`
however:
`-fno-unwind-tables` *
25 matches
Mail list logo