This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Need advice on bounds checking approaches



  In message <mszor3unld.fsf@tucson-net-82.eng.ascend.com>you write:
  > >   > (Should I somehow mark conditional traps as being generated
  > >   > automatically by bounds checking, and only optimize those away, or
  > >   > should I just document the as yet undocumented __builtin_trap as
  > >   > subject to this optimization?)
  > > I don't think so.
  > 
  > There are two questions here.  Which one are you answering?
  > (a) only optimize away redundant trap_if associate with BPs?
  > (b) optimize away all redundant trap_if, and document that behavior
  >     for __builtin_trap?  (incidentally, __builtin_trap is undocumented)
I think we should always remove redundant trap_ifs that we find, regardless
of whether they're created by bounded-pointers or some other mechanism.
Documenting this behavior (along with __builtin_trap) would be wise.

jeff



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]