#include "config.h"
#include "system.h"
#include "coretypes.h"
-#include "hash-set.h"
-#include "vec.h"
-#include "input.h"
#include "alias.h"
#include "symtab.h"
#include "options.h"
-#include "inchash.h"
#include "tree.h"
#include "fold-const.h"
#include "stor-layout.h"
#include "tm.h"
#include "hard-reg-set.h"
#include "function.h"
-#include "is-a.h"
+#include "calls.h"
#include "tree-ssa-alias.h"
#include "predict.h"
#include "basic-block.h"
#include "gimple.h"
-#include "ipa-ref.h"
#include "lto-streamer.h"
#include "cgraph.h"
#include "tree-chkp.h"
if (gimple_has_body_p (fndecl))
{
- /* If function will not be instrumented, then it's instrumented
- version is a thunk for the original. */
- if (!chkp_instrumentable_p (fndecl))
- {
- clone->remove_callees ();
- clone->remove_all_references ();
- clone->thunk.thunk_p = true;
- clone->thunk.add_pointer_bounds_args = true;
- clone->create_edge (node, NULL, 0, CGRAPH_FREQ_BASE);
- /* Thunk shouldn't be a cdtor. */
- DECL_STATIC_CONSTRUCTOR (clone->decl) = 0;
- DECL_STATIC_DESTRUCTOR (clone->decl) = 0;
- }
- else
- {
- tree_function_versioning (fndecl, new_decl, NULL, false,
- NULL, false, NULL, NULL);
- clone->lowered = true;
- }
+ gcc_assert (chkp_instrumentable_p (fndecl));
+ tree_function_versioning (fndecl, new_decl, NULL, false,
+ NULL, false, NULL, NULL);
+ clone->lowered = true;
}
/* New params are inserted after versioning because it